git.annexia.org
/
miniexpect.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Small fix to documentation.
[miniexpect.git]
/
miniexpect.c
diff --git
a/miniexpect.c
b/miniexpect.c
index
8c1efd9
..
e1a184c
100644
(file)
--- a/
miniexpect.c
+++ b/
miniexpect.c
@@
-35,6
+35,13
@@
#include <pcre.h>
#include <pcre.h>
+/* RHEL 6 pcre did not define PCRE_PARTIAL_SOFT. However PCRE_PARTIAL
+ * is a synonym so use that.
+ */
+#ifndef PCRE_PARTIAL_SOFT
+#define PCRE_PARTIAL_SOFT PCRE_PARTIAL
+#endif
+
#include "miniexpect.h"
#define DEBUG 0
#include "miniexpect.h"
#define DEBUG 0
@@
-107,6
+114,7
@@
mexp_spawnl (const char *file, const char *arg, ...)
new_argv = realloc (argv, sizeof (char *) * (i+1));
if (new_argv == NULL) {
free (argv);
new_argv = realloc (argv, sizeof (char *) * (i+1));
if (new_argv == NULL) {
free (argv);
+ va_end (args);
return NULL;
}
argv = new_argv;
return NULL;
}
argv = new_argv;
@@
-115,6
+123,7
@@
mexp_spawnl (const char *file, const char *arg, ...)
h = mexp_spawnv (file, argv);
free (argv);
h = mexp_spawnv (file, argv);
free (argv);
+ va_end (args);
return h;
}
return h;
}