Fixed on GitHub:
diff --git a/journald.c b/journald.c
index 0efc223..b106c52 100644
--- a/journald.c
+++ b/journald.c
@@ -17,6 +17,12 @@ journald_send(PyObject *self, PyObject *args) {
for (i = 0; i < argc; ++i) {
PyObject *item = PyTuple_GetItem(args, i);
char * stritem = PyString_AsString(item);
+ if (stritem == NULL) {
+ // PyString_AsString has already raised TypeError at this
+ // point. We can just free iov and return NULL.
+ free(iov);
+ return NULL;
+ }
iov[i].iov_base = stritem;
iov[i].iov_len = strlen(stritem);
}
--
David Strauss
| [email protected]
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel