mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Fixes crash when starting a call at the first time
This commit is contained in:
parent
4836f295b2
commit
872fe00eda
1 changed files with 4 additions and 4 deletions
|
|
@ -818,13 +818,13 @@ bool_t lp_config_relative_file_exists(const LpConfig *lpconfig, const char *file
|
|||
if (lpconfig->filename == NULL) {
|
||||
return FALSE;
|
||||
} else {
|
||||
char *filename = ms_strdup(lpconfig->filename);
|
||||
const char *dir = _lp_config_dirname(filename);
|
||||
char *conf_path = ms_strdup(lpconfig->filename);
|
||||
const char *dir = _lp_config_dirname(conf_path);
|
||||
char *filepath = ms_strdup_printf("%s/%s", dir, filename);
|
||||
char *realfilepath = lp_realpath(filepath, NULL);
|
||||
FILE *file;
|
||||
|
||||
ms_free(filename);
|
||||
ms_free(conf_path);
|
||||
ms_free(filepath);
|
||||
|
||||
if(realfilepath == NULL) return FALSE;
|
||||
|
|
@ -912,7 +912,7 @@ int lp_config_read_relative_file(const LpConfig *lpconfig, const char *filename,
|
|||
return 0;
|
||||
|
||||
err:
|
||||
ms_free(filepath);
|
||||
ms_free(dup_config_file);
|
||||
ms_free(filepath);
|
||||
if(realfilepath) ms_free(realfilepath);
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue