[cheese/gnome-3-6] Return NULL rather than a const empty string
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/gnome-3-6] Return NULL rather than a const empty string
- Date: Tue, 30 Oct 2012 15:49:36 +0000 (UTC)
commit e2938847c7bca93bd9f59d009de78e0cec8d2745
Author: David King <amigadave amigadave com>
Date: Tue Oct 30 09:35:16 2012 +0000
Return NULL rather than a const empty string
Fix bug 687042 and bug 687123 by returning NULL from
cheese_camera_get_recorded_time() rather than a const empty string. The
returned NULL can be safely freed with g_free(), whereas freeing the
const string is undefined and leads to a crash with glibc.
libcheese/cheese-camera.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 6874858..03c696e 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -1803,6 +1803,6 @@ cheese_camera_get_recorded_time (CheeseCamera *camera)
hours, minutes, seconds);
} else {
GST_WARNING ("Failed to get time from video filesink from camerabin");
- return "";
+ return NULL;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]