Fix use of uninitialized variable
This commit is contained in:
parent
7d3418e9c7
commit
1a13f39cf6
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue