Merge pull request #5 from squishyhuman/fix-uninitialized-var
Fix use of uninitialized variable
This commit is contained in:
commit
3e39fec066
1 changed files with 5 additions and 5 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,7 @@ int ipfs_dns (int argc, char **argv)
|
||||||
|
|
||||||
free (*txt);
|
free (*txt);
|
||||||
free (txt);
|
free (txt);
|
||||||
free (param);
|
param = path;
|
||||||
|
|
||||||
if (! r) {
|
if (! r) {
|
||||||
// not recursive.
|
// not recursive.
|
||||||
|
@ -153,11 +155,9 @@ int ipfs_dns (int argc, char **argv)
|
||||||
if (memcmp(path, "/ipfs/", 6) == 0) {
|
if (memcmp(path, "/ipfs/", 6) == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
param = path;
|
|
||||||
} while (--r);
|
} while (--r);
|
||||||
fprintf (stdout, "%s\n", path);
|
fprintf (stdout, "%s\n", param);
|
||||||
free (path);
|
free (param);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue