diff options
Diffstat (limited to 'libopkg/file_util.c')
-rw-r--r-- | libopkg/file_util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libopkg/file_util.c b/libopkg/file_util.c index cf5f774..897546e 100644 --- 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); |