After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783955 - mpegpsmux: remove unnecessary g_return_val_if_fail()
mpegpsmux: remove unnecessary g_return_val_if_fail()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal minor
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-19 11:59 UTC by Eunhae Choi
Modified: 2017-06-26 23:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mpegpsmux : remove caps leak and invalid return (892 bytes, patch)
2017-06-19 12:00 UTC, Eunhae Choi
committed Details | Review

Description Eunhae Choi 2017-06-19 11:59:23 UTC
I have found caps leak and invalid return at mpegpsmux_create_stream()


line 232:
  g_return_val_if_fail (s != NULL, FALSE);
Comment 1 Eunhae Choi 2017-06-19 12:00:40 UTC
Created attachment 354035 [details] [review]
mpegpsmux : remove caps leak and invalid return
Comment 2 Sebastian Dröge (slomo) 2017-06-20 06:26:27 UTC
Review of attachment 354035 [details] [review]:

::: gst/mpegpsmux/mpegpsmux.c
@@ -231,2 @@
   s = gst_caps_get_structure (caps, 0);
-  g_return_val_if_fail (s != NULL, FALSE);

How were you able to make this assertion happen? It looks like this code can't ever happen unless something is really wrong elsewhere already... in which case the caps leak is probably the least of the problems.
Comment 3 Eunhae Choi 2017-06-20 06:38:07 UTC
I don't have real issue about this.
I have found it during merging the latest upstream patches to my local.
Comment 4 Tim-Philipp Müller 2017-06-26 23:24:19 UTC
commit ed5d677dce5d2cbde684fc2cc753477fdde312bf
Author: Eunhae Choi <eunhae1.choi@samsung.com>
Date:   Mon Jun 19 20:35:30 2017 +0900

    mpegpsmux: remove unnecessary g_return_if_fail()
    
    This should never happen, and should be a g_assert()
    if it's a worry. Fixes warnings from source code
    checkers about possible caps leaks here.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783955