aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/hv/hv_kvp_daemon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index 418ac5548f98..ba075e514422 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -1299,6 +1299,7 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)
1299 } 1299 }
1300 1300
1301 error = kvp_write_file(file, "HWADDR", "", mac_addr); 1301 error = kvp_write_file(file, "HWADDR", "", mac_addr);
1302 free(mac_addr);
1302 if (error) 1303 if (error)
1303 goto setval_error; 1304 goto setval_error;
1304 1305
@@ -1344,7 +1345,6 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)
1344 goto setval_error; 1345 goto setval_error;
1345 1346
1346setval_done: 1347setval_done:
1347 free(mac_addr);
1348 fclose(file); 1348 fclose(file);
1349 1349
1350 /* 1350 /*
@@ -1358,7 +1358,6 @@ setval_done:
1358 1358
1359setval_error: 1359setval_error:
1360 syslog(LOG_ERR, "Failed to write config file"); 1360 syslog(LOG_ERR, "Failed to write config file");
1361 free(mac_addr);
1362 fclose(file); 1361 fclose(file);
1363 return error; 1362 return error;
1364} 1363}