projects
/
oweals
/
opkg-lede.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
A proper fix this time. From Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>.
[oweals/opkg-lede.git]
/
libopkg
/
file_util.c
diff --git
a/libopkg/file_util.c
b/libopkg/file_util.c
index cf5f7740e2bed43896575bde18d91fe15ccbb688..897546e838d4d8298ddb94a2546fdbfb283371fb 100644
(file)
--- a/
libopkg/file_util.c
+++ b/
libopkg/file_util.c
@@
-238,6
+238,11
@@
rm_r(const char *path)
DIR *dir;
struct dirent *dent;
+ if (path == NULL) {
+ opkg_perror(ERROR, "Missing directory parameter");
+ return -1;
+ }
+
dir = opendir(path);
if (dir == NULL) {
opkg_perror(ERROR, "Failed to open dir %s", path);