forked from ariadne/pkgconf
argvsplit: add argv_free().
parent
9d2bd0b66d
commit
83e7e2e733
|
@ -24,6 +24,12 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "pkg.h"
|
#include "pkg.h"
|
||||||
|
|
||||||
|
void argv_free(char **argv)
|
||||||
|
{
|
||||||
|
free(argv[0]);
|
||||||
|
free(argv);
|
||||||
|
}
|
||||||
|
|
||||||
int argv_split(const char *src, int *argc, char ***argv)
|
int argv_split(const char *src, int *argc, char ***argv)
|
||||||
{
|
{
|
||||||
char *buf = malloc(strlen(src) + 1);
|
char *buf = malloc(strlen(src) + 1);
|
||||||
|
|
1
pkg.h
1
pkg.h
|
@ -151,6 +151,7 @@ void pkg_dependency_free(pkg_dependency_t *head);
|
||||||
|
|
||||||
/* argvsplit.c */
|
/* argvsplit.c */
|
||||||
int argv_split(const char *src, int *argc, char ***argv);
|
int argv_split(const char *src, int *argc, char ***argv);
|
||||||
|
void argv_free(char **argv);
|
||||||
|
|
||||||
/* fragment.c */
|
/* fragment.c */
|
||||||
pkg_fragment_t *pkg_fragment_append(pkg_fragment_t *head, pkg_fragment_t *tail);
|
pkg_fragment_t *pkg_fragment_append(pkg_fragment_t *head, pkg_fragment_t *tail);
|
||||||
|
|
Loading…
Reference in New Issue