diff options
author | Oliver Smith <osmith@sysmocom.de> | 2022-12-23 12:53:12 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2022-12-23 13:38:19 +0100 |
commit | c5f034b13d8ad88c4c97e1397750e8c9f0b0fff4 (patch) | |
tree | c92fad00dd5169dbc74494c7522a774ec74993ab | |
parent | 01155eaee657c28bfbbf5b6f864bd00000ea6b43 (diff) |
osmo_mdns_rfc_record_decode: proper free on err
Free the whole talloc tree of ret if we can't allocate memory for
ret->rdata.
Related: OS#5821
Change-Id: Iefc89e3c75a4bf4ffee3871c7b551a2a608f7d5f
-rw-r--r-- | src/mslookup/mdns_rfc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mslookup/mdns_rfc.c b/src/mslookup/mdns_rfc.c index 1bbc7b1..eddba30 100644 --- a/src/mslookup/mdns_rfc.c +++ b/src/mslookup/mdns_rfc.c @@ -263,7 +263,7 @@ struct osmo_mdns_rfc_record *osmo_mdns_rfc_record_decode(void *ctx, const uint8_ /* rdata */ ret->rdata = talloc_memdup(ret, data + name_len + 10, ret->rdlength); if (!ret->rdata) - return NULL; + goto error; *record_len = name_len + 10 + ret->rdlength; return ret; |