From a12def2ef9f33f024b5cda7f48fc794f48315a5d Mon Sep 17 00:00:00 2001 From: graham.gower@gmail.com Date: Mon, 20 Sep 2010 21:25:04 -0400 Subject: A proper fix this time. From Sergey 'Jin' Bostandzhyan . git-svn-id: http://opkg.googlecode.com/svn/trunk@573 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/file_util.c') 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); -- cgit v0.9.1