fix: NULL out empty string

This commit is contained in:
Mark Puha 2025-07-22 18:19:48 +02:00
parent 3a610feb96
commit 110e1b1ee6
2 changed files with 1 additions and 2 deletions

View file

@ -421,7 +421,7 @@ err:
static inline bool parse_awg_string(char **device_value, const char *name, const char *value) {
size_t len = strlen(value);
if (!len) {
*device_value = "";
*device_value = NULL;
return true;
}

View file

@ -151,7 +151,6 @@ static inline void free_wgdevice(struct wgdevice *dev)
free(peer);
}
free(dev->init_packet_magic_header);
free(dev->response_packet_magic_header);
free(dev->underload_packet_magic_header);