We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4f66cc commit bc56aceCopy full SHA for bc56ace
journald.c
@@ -17,6 +17,12 @@ journald_send(PyObject *self, PyObject *args) {
17
for (i = 0; i < argc; ++i) {
18
PyObject *item = PyTuple_GetItem(args, i);
19
char * stritem = PyString_AsString(item);
20
+ if (stritem == NULL) {
21
+ // PyString_AsString has already raised TypeError at this
22
+ // point. We can just free iov and return NULL.
23
+ free(iov);
24
+ return NULL;
25
+ }
26
iov[i].iov_base = stritem;
27
iov[i].iov_len = strlen(stritem);
28
}
0 commit comments