1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

Do not segfault if corepath is not set up properly

This commit is contained in:
Volker Lendecke 2008-06-13 11:56:40 +02:00 committed by Michael Adam
parent f4c37dbe2c
commit 41d1b9541c

View File

@ -188,6 +188,11 @@ void dump_core_setup(const char *progname)
become_root();
}
if (corepath == NULL) {
DEBUG(0, ("Can not dump core: corepath not set up\n"));
exit(1);
}
if (*corepath != '\0') {
/* The chdir might fail if we dump core before we finish
* processing the config file.