* varobj.c (c_value_of_variable): Use xstrdup.
authorVladimir Prus <vladimir@codesourcery.com>
Mon, 4 Feb 2008 07:49:04 +0000 (07:49 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Mon, 4 Feb 2008 07:49:04 +0000 (07:49 +0000)
gdb/ChangeLog
gdb/varobj.c

index 626347167cc8b6ee7e455aee4f716c3bb18bd5c6..8e06da0903204da7a4fae051520fde85c1265ba9 100644 (file)
@@ -1,3 +1,7 @@
+2008-02-04  Vladimir Prus  <vladimir@codesourcery.com>
+
+       * varobj.c (c_value_of_variable): Use xstrdup.
+
 2008-02-04  Vladimir Prus  <vladimir@codesourcery.com>
 
        Update stored rendition of varobj value when format changes.
index 258e0bff255f4f3a7ffd24734962ed9b29aa9f79..223693180c7be46d48ecab28185cba0ce6d8fbab 100644 (file)
@@ -2252,7 +2252,7 @@ c_value_of_variable (struct varobj *var)
 
            gdb_assert (varobj_value_is_changeable_p (var));
            gdb_assert (!value_lazy (var->value));
-           return strdup (var->print_value);
+           return xstrdup (var->print_value);
          }
       }
     }