Commit 2fde7d88 authored by Bastien Nocera's avatar Bastien Nocera

optical-media: Fix invalid read error when getting mounts

==8716== Invalid read of size 8
==8716==    at 0x48DEFA3: g_list_last (glist.c:930)
==8716==    by 0x48DEFEE: g_list_append (glist.c:270)
==8716==    by 0x150EC886: parsed_finished (grl-optical-media.c:576)
==8716==  Address 0x1068bed8 is 8 bytes inside a block of size 24 free'd
==8716==    at 0x483897B: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==8716==    by 0x49014D1: g_slice_free_chain_with_offset (gslice.c:1231)
==8716==    by 0x150EC542: grl_optical_media_source_browse (grl-optical-media.c:639)
==8716==    by 0x487C3B2: browse_idle (grl-source.c:2487)
==8716==  Block was alloc'd at
==8716==    at 0x483774F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==8716==    by 0x48E8900: g_malloc (gmem.c:99)
==8716==    by 0x4900882: g_slice_alloc (gslice.c:1024)
==8716==    by 0x48DEFD3: g_list_append (glist.c:264)
==8716==    by 0x150EBA9A: parsed_finished_item (grl-optical-media.c:416)
parent 0c5a98c1
Pipeline #61875 passed with stage
in 3 minutes and 1 second
......@@ -704,6 +704,7 @@ grl_optical_media_source_browse (GrlSource *source,
GRL_DEBUG ("%s", __FUNCTION__);
g_list_free_full (priv->list, g_object_unref);
priv->list = NULL;
media_list = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment