rtph265depay: Fix Memory leak in error case
https://bugzilla.gnome.org/show_bug.cgi?id=787937
diff --git a/gst/rtp/gstrtph265depay.c b/gst/rtp/gstrtph265depay.c
index dca0add..ce62777 100644
--- a/gst/rtp/gstrtph265depay.c
+++ b/gst/rtp/gstrtph265depay.c
@@ -1237,6 +1237,7 @@
if (rtph265depay->byte_stream) {
memcpy (map.data, sync_bytes, sizeof (sync_bytes));
} else {
+ gst_buffer_unmap (outbuf, &map);
goto not_implemented;
}
@@ -1402,6 +1403,7 @@
if (rtph265depay->byte_stream) {
memcpy (map.data, sync_bytes, sizeof (sync_bytes));
} else {
+ gst_buffer_unmap (outbuf, &map);
goto not_implemented;
}
memcpy (map.data + sizeof (sync_bytes), payload, nalu_size);