projects
/
project
/
uclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
uclient-fetch: Check for nullpointer returned by uclient_get_url_filename
[project/uclient.git]
/
uclient-fetch.c
diff --git
a/uclient-fetch.c
b/uclient-fetch.c
index
6961d94
..
38c9c53
100644
(file)
--- a/
uclient-fetch.c
+++ b/
uclient-fetch.c
@@
-122,6
+122,11
@@
static int open_output_file(const char *path, uint64_t resume_offset)
}
} else {
filename = uclient_get_url_filename(path, "index.html");
+ if (!filename) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
output_file = filename;
}
@@
-151,6
+156,7
@@
done:
free:
free(filename);
+out:
return ret;
}