coredumpctl: fix potential deref of null pointer
This commit is contained in:
parent
7849c2acd4
commit
d0c8806d4a
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue