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: Iefc89e3c75a4bf4ffee3871c7b551a2a608f7d5fchanges/76/30776/1
parent
01155eaee6
commit
c5f034b13d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue