diff options
author | Tim Taubert <ttaubert@mozilla.com> | 2016-09-24 11:35:31 +0200 |
---|---|---|
committer | Tim Taubert <ttaubert@mozilla.com> | 2016-09-24 11:35:31 +0200 |
commit | b6a2236b52c651695ed55f311bca8353234bbd69 (patch) | |
tree | de6e89089dff2c7f32100187db77a627aa5837e8 /cmd/signtool | |
parent | 6c214486e9ef0f7b8653dea24689e5491de959b6 (diff) | |
download | nss-hg-b6a2236b52c651695ed55f311bca8353234bbd69.tar.gz |
Bug 1305219 - Fix some minor issues reported by Coverity r=franziskus
Diffstat (limited to 'cmd/signtool')
-rw-r--r-- | cmd/signtool/javascript.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/signtool/javascript.c b/cmd/signtool/javascript.c index 896bb8a62..746f724f8 100644 --- a/cmd/signtool/javascript.c +++ b/cmd/signtool/javascript.c @@ -1706,12 +1706,13 @@ make_dirs(char *path, int file_perms) } Path = PL_strdup(path); + if (!Path) { + return 0; + } + start = strpbrk(Path, "/\\"); if (!start) { - if (Path) { - PR_Free(Path); - } - return 0; + goto loser; } start++; /* start right after first slash */ |