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 {
|
||||
err = ipfs_dnslink_resolv_lookupTXT (&txt, param);
|
||||
}
|
||||
free (param);
|
||||
|
||||
if (err) {
|
||||
fprintf (stderr, "dns lookupTXT: %s\n", Err[err]);
|
||||
return err;
|
||||
|
@ -143,7 +145,6 @@ int ipfs_dns (int argc, char **argv)
|
|||
|
||||
free (*txt);
|
||||
free (txt);
|
||||
free (param);
|
||||
param = path;
|
||||
|
||||
if (! r) {
|
||||
|
|
Loading…
Reference in a new issue