Merge pull request #9922 from donaldsharp/fix_scripting

lib: Return Null when we have an empty string for script name
This commit is contained in:
Martin Winter 2021-11-01 23:35:12 +01:00 committed by GitHub
commit f69bc0e919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,6 +103,10 @@ char *frrscript_names_get_script_name(const char *function_name)
frrscript_names_find(&frrscript_names_hash, &lookup); frrscript_names_find(&frrscript_names_hash, &lookup);
if (!snhe) if (!snhe)
return NULL; return NULL;
if (snhe->script_name[0] == '\0')
return NULL;
return snhe->script_name; return snhe->script_name;
} }