mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
registrychunks: Initialize typefind/element factory registry chunks with zeroes
This makes valgrind stop complaining about reading unitializated memory, which is not initialized because it's just compiler-added struct padding...
This commit is contained in:
parent
7ddbee758d
commit
b5e875d201
1 changed files with 8 additions and 2 deletions
|
@ -231,7 +231,10 @@ gst_registry_chunks_save_feature (GList ** list, GstPluginFeature * feature)
|
|||
GstRegistryChunkElementFactory *ef;
|
||||
GstElementFactory *factory = GST_ELEMENT_FACTORY (feature);
|
||||
|
||||
ef = g_slice_new (GstRegistryChunkElementFactory);
|
||||
/* Initialize with zeroes because of struct padding and
|
||||
* valgrind complaining about copying unitialized memory
|
||||
*/
|
||||
ef = g_slice_new0 (GstRegistryChunkElementFactory);
|
||||
chk =
|
||||
gst_registry_chunks_make_data (ef,
|
||||
sizeof (GstRegistryChunkElementFactory));
|
||||
|
@ -291,7 +294,10 @@ gst_registry_chunks_save_feature (GList ** list, GstPluginFeature * feature)
|
|||
GstTypeFindFactory *factory = GST_TYPE_FIND_FACTORY (feature);
|
||||
gchar *str;
|
||||
|
||||
tff = g_slice_new (GstRegistryChunkTypeFindFactory);
|
||||
/* Initialize with zeroes because of struct padding and
|
||||
* valgrind complaining about copying unitialized memory
|
||||
*/
|
||||
tff = g_slice_new0 (GstRegistryChunkTypeFindFactory);
|
||||
chk =
|
||||
gst_registry_chunks_make_data (tff,
|
||||
sizeof (GstRegistryChunkTypeFindFactory));
|
||||
|
|
Loading…
Reference in a new issue