[sound-juicer] Don't try to free an uninitialized pointer
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sound-juicer] Don't try to free an uninitialized pointer
- Date: Wed, 19 Jun 2013 21:03:05 +0000 (UTC)
commit d51b2b8fbbb6d1edbaa93c5378911d299f41d50a
Author: Christophe Fergeau <cfergeau redhat com>
Date: Thu Apr 4 15:08:40 2013 +0200
Don't try to free an uninitialized pointer
brasero_drive_lock() is documented as filling a 'reason_for_failure'
arg with a description string when an error occurs. However, the
method does nothing with this parameter, it does not even initialize
it. This causes sound-juicer to crash when hitting this code path
as it's assuming this varialble will be set in error cases,
and it's trying to free this uninitialized pointer.
Avoid this crash by initializing 'reason' to NULL, g_free() will
be a no-op..
https://bugzilla.gnome.org/show_bug.cgi?id=665881
src/sj-extracting.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/sj-extracting.c b/src/sj-extracting.c
index 4802d57..ae8ee93 100644
--- a/src/sj-extracting.c
+++ b/src/sj-extracting.c
@@ -744,7 +744,7 @@ on_progress_cancel_clicked (GtkWidget *button, gpointer user_data)
G_MODULE_EXPORT void
on_extract_activate (GtkWidget *button, gpointer user_data)
{
- char *reason;
+ char *reason = NULL;
/* first make sure we're not playing, we cannot share the resource */
stop_playback ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]