mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08: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