aboutsummaryrefslogtreecommitdiff
path: root/backends/hostmem-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/hostmem-file.c')
-rw-r--r--backends/hostmem-file.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
index 4b55361010..e9b6d21dac 100644
--- a/backends/hostmem-file.c
+++ b/backends/hostmem-file.c
@@ -83,9 +83,7 @@ static void set_mem_path(Object *o, const char *str, Error **errp)
error_setg(errp, "cannot change property value");
return;
}
- if (fb->mem_path) {
- g_free(fb->mem_path);
- }
+ g_free(fb->mem_path);
fb->mem_path = g_strdup(str);
}