goto error;
}
pathname = strndup(tmp_path, sizeof(tmp_path));
+ if (!pathname) {
+ PERROR("strndup");
+ goto error;
+ }
/* Create directory */
ret = run_as_mkdir_recursive(pathname, S_IRWXU | S_IRWXG, uid, gid);
goto error;
}
pathname = strndup(tmp_path, sizeof(tmp_path));
+ if (!pathname) {
+ PERROR("strndup");
+ goto error;
+ }
DBG3("Kernel network consumer subdir path: %s", pathname);
}
if (monitor) {
pathname = create_channel_path(consumer, session->uid, session->gid);
- if (!pathname) {
- ret = -1;
- goto error;
- }
} else {
/* Empty path. */
pathname = strdup("");
}
+ if (!pathname) {
+ ret = -1;
+ goto error;
+ }
/* Prep channel message structure */
consumer_init_channel_comm_msg(&lkm,
if (monitor) {
pathname = create_channel_path(consumer, session->uid, session->gid);
- if (!pathname) {
- ret = -1;
- goto error;
- }
} else {
/* Empty path. */
pathname = strdup("");
}
+ if (!pathname) {
+ ret = -1;
+ goto error;
+ }
/* Prep channel message structure */
consumer_init_channel_comm_msg(&lkm,