coredumpctl: fix potential deref of null pointer

This commit is contained in:
Thomas Hindoe Paaboel Andersen 2014-06-27 00:17:22 +02:00
parent 7849c2acd4
commit d0c8806d4a

View file

@ -601,8 +601,10 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) {
}
if (filename && !endswith(filename, ".xz")) {
*path = filename;
filename = NULL;
if (path) {
*path = filename;
filename = NULL;
}
return 0;
} else {