summaryrefslogtreecommitdiffstats
path: root/sys/v4l2/gstv4l2object.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/v4l2/gstv4l2object.c')
-rw-r--r--sys/v4l2/gstv4l2object.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index 48497fc7..c842e8b9 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -278,17 +278,14 @@ gst_v4l2_object_new (GstElement * element,
}
void
-gst_v4l2_object_destroy (GstV4l2Object ** v4l2object)
+gst_v4l2_object_destroy (GstV4l2Object * v4l2object)
{
- if (*v4l2object) {
- if ((*v4l2object)->videodev) {
- g_free ((*v4l2object)->videodev);
- (*v4l2object)->videodev = NULL;
- }
+ g_return_if_fail (v4l2object != NULL);
- g_free (*v4l2object);
- *v4l2object = NULL;
- }
+ if (v4l2object->videodev)
+ g_free (v4l2object->videodev);
+
+ g_free (v4l2object);
}
gboolean