On Tue, Apr 17, 2018 at 10:53:19AM -0700, Jason Gerecke wrote:
> Reported by PVS Studio:
> 
>     V773 The function was exited without releasing the 'devices' pointer.
>     A memory leak is possible.
> 
> Signed-off-by: Jason Gerecke <jason.gere...@wacom.com>
> ---
>  libwacom/libwacom-database.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c
> index 33c4393..1da9adf 100644
> --- a/libwacom/libwacom-database.c
> +++ b/libwacom/libwacom-database.c
> @@ -854,6 +854,7 @@ libwacom_list_devices_from_database(const 
> WacomDeviceDatabase *db, WacomError *e
>       list = calloc (g_list_length (devices) + 1, sizeof (WacomDevice *));
>       if (!list) {
>               libwacom_error_set(error, WERROR_BAD_ALLOC, "Memory allocation 
> failed");
> +             g_list_free (devices);
>               return NULL;
>       }
>  
> -- 
> 2.17.0

Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net>

Cheers,
   Peter
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to