[ostree] libotutil: Fix a possible uninitialized free() in error path



commit d0d98d3abeb596523093ccecabe4038c2c150cdc
Author: Colin Walters <walters verbum org>
Date:   Sat Jan 18 04:52:45 2014 -0500

    libotutil: Fix a possible uninitialized free() in error path
    
    Spotted by gcc.

 src/libotutil/ot-keyfile-utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libotutil/ot-keyfile-utils.c b/src/libotutil/ot-keyfile-utils.c
index f7d8cc1..833a76f 100644
--- a/src/libotutil/ot-keyfile-utils.c
+++ b/src/libotutil/ot-keyfile-utils.c
@@ -69,7 +69,7 @@ ot_keyfile_get_value_with_default (GKeyFile      *keyfile,
 {
   gboolean ret = FALSE;
   GError *temp_error = NULL;
-  gs_free char *ret_value;
+  gs_free char *ret_value = NULL;
 
   ret_value = g_key_file_get_value (keyfile, section, value, &temp_error);
   if (temp_error)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]