Fix use of uninitialized variable

yamux
squishyhuman 2017-01-19 11:26:57 -08:00
parent 7d3418e9c7
commit 1a13f39cf6
1 changed files with 3 additions and 4 deletions

View File

@ -144,6 +144,7 @@ int ipfs_dns (int argc, char **argv)
free (*txt);
free (txt);
free (param);
param = path;
if (! r) {
// not recursive.
@ -153,11 +154,9 @@ int ipfs_dns (int argc, char **argv)
if (memcmp(path, "/ipfs/", 6) == 0) {
break;
}
param = path;
} while (--r);
fprintf (stdout, "%s\n", path);
free (path);
fprintf (stdout, "%s\n", param);
free (param);
return 0;
}