alsamidisrc: Prevent Valgrind from reporting cached config as memory leaks

See http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=MEMORY-LEAK;hb=HEAD

This allows to have cleaner Valgrind reports about alsamidisrc and make
it easier to spot actual problems.

https://bugzilla.gnome.org/show_bug.cgi?id=787683
This commit is contained in:
Antonio Ospite 2017-09-25 15:14:45 +02:00 committed by Nicolas Dufresne
parent 8638d81eb3
commit f671026f11

View file

@ -94,6 +94,12 @@ init_seq (GstAlsaMidiSrc * alsamidisrc)
goto error;
}
/*
* Prevent Valgrind from reporting cached configuration as memory leaks, see:
* http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=MEMORY-LEAK;hb=HEAD
*/
snd_config_update_free_global ();
ret = snd_seq_set_client_name (alsamidisrc->seq, DEFAULT_CLIENT_NAME);
if (ret < 0) {
GST_ERROR_OBJECT (alsamidisrc, "Cannot set client name - %s",