diff options
author | Mohammed Sadiq <sadiq@sadiqpk.org> | 2018-12-20 10:26:56 +0530 |
---|---|---|
committer | Mohammed Sadiq <sadiq@sadiqpk.org> | 2018-12-20 10:26:56 +0530 |
commit | 1df276f263136898d609571aa697c6dc832b2312 (patch) | |
tree | c3c7281235d44c2b353ab23af1fec7f5e7ab8104 | |
parent | 38cba6895a5749386954b6de3ac8a6723f4fc5db (diff) | |
download | gtk+-1df276f263136898d609571aa697c6dc832b2312.tar.gz |
mediastream: Fix possible memory leak
@error is (transfer full). So the error passed should be freed if not used
-rw-r--r-- | gtk/gtkmediastream.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkmediastream.c b/gtk/gtkmediastream.c index f8a5dc8ce9..e6529041f7 100644 --- a/gtk/gtkmediastream.c +++ b/gtk/gtkmediastream.c @@ -1137,7 +1137,10 @@ gtk_media_stream_gerror (GtkMediaStream *self, g_return_if_fail (error != NULL); if (priv->error) - return; + { + g_error_free (error); + return; + } g_object_freeze_notify (G_OBJECT (self)); |