aboutsummaryrefslogtreecommitdiff
path: root/fdtput.c
diff options
context:
space:
mode:
Diffstat (limited to 'fdtput.c')
-rw-r--r--fdtput.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fdtput.c b/fdtput.c
index 9b15c53..db65e96 100644
--- a/fdtput.c
+++ b/fdtput.c
@@ -328,7 +328,7 @@ static int delete_node(char *blob, const char *node_name)
static int do_fdtput(struct display_info *disp, const char *filename,
char **arg, int arg_count)
{
- char *value;
+ char *value = NULL;
char *blob;
char *node;
int len, ret = 0;
@@ -374,6 +374,11 @@ static int do_fdtput(struct display_info *disp, const char *filename,
}
free(blob);
+
+ if (value) {
+ free(value);
+ }
+
return ret;
}