-/* pkg_vec.c - the itsy package management system
+/* pkg_vec.c - the opkg package management system
Steven M. Ayer
General Public License for more details.
*/
-#include <stdlib.h>
+#include "includes.h"
#include <fnmatch.h>
#include "xregex.h"
-#include "opkg.h"
#include "pkg.h"
+#include "opkg_message.h"
pkg_vec_t * pkg_vec_alloc(void)
{
void pkg_vec_free(pkg_vec_t *vec)
{
- free(vec->pkgs);
+ if (!vec)
+ return;
+
+ if (vec->pkgs)
+ free(vec->pkgs);
+
free(vec);
}