mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-08-25 13:50:12 +03:00
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")) {
|
||||
*path = filename;
|
||||
filename = NULL;
|
||||
if (path) {
|
||||
*path = filename;
|
||||
filename = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user