summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/dhcp-option.c
diff options
context:
space:
mode:
authorDaniel Lockyer <thisisdaniellockyer@gmail.com>2017-11-24 10:33:41 +0000
committerDaniel Lockyer <thisisdaniellockyer@gmail.com>2017-11-24 10:33:41 +0000
commitf9ecfd3bbed396d744373dd6c8876b7211eac594 (patch)
tree036c4d7498abc62984d3d1daf8e6eba080943da7 /src/libsystemd-network/dhcp-option.c
parent5fecf46d76b31eedb3132cd569cfb82295e132bc (diff)
downloadsystemd-f9ecfd3bbed396d744373dd6c8876b7211eac594.tar.gz
Replace free and reassignment with free_and_replace
Diffstat (limited to 'src/libsystemd-network/dhcp-option.c')
-rw-r--r--src/libsystemd-network/dhcp-option.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libsystemd-network/dhcp-option.c b/src/libsystemd-network/dhcp-option.c
index 19fc525866..0489579e7f 100644
--- a/src/libsystemd-network/dhcp-option.c
+++ b/src/libsystemd-network/dhcp-option.c
@@ -191,9 +191,7 @@ static int parse_options(const uint8_t options[], size_t buflen, uint8_t *overlo
if (!ascii_is_valid(string))
return -EINVAL;
- free(*error_message);
- *error_message = string;
- string = NULL;
+ free_and_replace(*error_message, string);
}
break;