GNOME Bugzilla – Bug 674325
gupnp-didl-lite-resource.c:get_resolution_info contains a memory leak
Last modified: 2019-02-22 05:57:41 UTC
Created attachment 212288 [details] [review] Patch to fix a memory leak in gupnp-didl-lite-resource.c:get_resolution_info The leak can occur if the contents of the resolution tag are incorrectly specified, e.g., <res resolution="10"></res>. In such a case the vector of strings allocated by get_resolution_info will be leaked. Please find attached a patch that addresses this issue. The patch ensures that g_strfreev is invoked to free the string vector even if the contents of the resolution attribute are invalid.
Review of attachment 212288 [details] [review]: The patch looks completely weird in the review interface. There should be a newline before the goto and the indentation is one-off. Otherwise it's fine
Created attachment 212291 [details] [review] Version 2 of patch with formatting errors corrected Sorry about that. My editor was configured to insert tabs rather than spaces. Please find attached a new version of the patch with spaces instead of tabs and the requested new line.