v4l2: fix potential double-free of error debug string

gst_v4l2_clear_error() doesn't work like g_clear_error(), it
doesn't NULLify the pointer, so set freed debug string to NULL
so it doesn't get freed again if gst_v4l2_clear_error() is
called twice on the error.

CID 1362901
This commit is contained in:
Tim-Philipp Müller 2016-07-01 11:54:57 +01:00
parent 6d3071f200
commit 2d6c93efe5

View file

@ -171,6 +171,7 @@ gst_v4l2_clear_error (GstV4l2Error * v4l2err)
if (v4l2err) {
g_clear_error (&v4l2err->error);
g_free (v4l2err->dbg_message);
v4l2err->dbg_message = NULL;
}
}