coredumpctl: fix potential deref of null pointer
This commit is contained in:
@@ -601,8 +601,10 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (filename && !endswith(filename, ".xz")) {
|
if (filename && !endswith(filename, ".xz")) {
|
||||||
*path = filename;
|
if (path) {
|
||||||
filename = NULL;
|
*path = filename;
|
||||||
|
filename = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user