Fix possible memory leak
This commit is contained in:
parent
1a13f39cf6
commit
929bc07168
1 changed files with 2 additions and 1 deletions
|
@ -128,6 +128,8 @@ int ipfs_dns (int argc, char **argv)
|
||||||
} else {
|
} else {
|
||||||
err = ipfs_dnslink_resolv_lookupTXT (&txt, param);
|
err = ipfs_dnslink_resolv_lookupTXT (&txt, param);
|
||||||
}
|
}
|
||||||
|
free (param);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
fprintf (stderr, "dns lookupTXT: %s\n", Err[err]);
|
fprintf (stderr, "dns lookupTXT: %s\n", Err[err]);
|
||||||
return err;
|
return err;
|
||||||
|
@ -143,7 +145,6 @@ int ipfs_dns (int argc, char **argv)
|
||||||
|
|
||||||
free (*txt);
|
free (*txt);
|
||||||
free (txt);
|
free (txt);
|
||||||
free (param);
|
|
||||||
param = path;
|
param = path;
|
||||||
|
|
||||||
if (! r) {
|
if (! r) {
|
||||||
|
|
Loading…
Reference in a new issue