mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-08 20:41:59 +03:00
(edit_get_match_keyword_cmd): fix possible NULL dereference.
Found by Coverity. Coverity id #32609. Signed-off-by: Andreas Mohr <and@gmx.li> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
40b96b67dd
commit
ae244077af
@ -3538,7 +3538,7 @@ edit_get_match_keyword_cmd (WEdit * edit)
|
||||
path = ptr;
|
||||
g_free (tagfile);
|
||||
tagfile = mc_build_filename (path, TAGS_NAME, (char *) NULL);
|
||||
if (exist_file (tagfile))
|
||||
if (tagfile != NULL && exist_file (tagfile))
|
||||
break;
|
||||
}
|
||||
while (strcmp (path, PATH_SEP_STR) != 0);
|
||||
|
Loading…
Reference in New Issue
Block a user