FS-11785 [core] fix scan-build issues

This commit is contained in:
Chris Rienzo
2019-05-03 00:58:51 +00:00
committed by Andrey Volk
parent bc6fe22a0b
commit 239bf913f4
4 changed files with 6 additions and 15 deletions
+1 -1
View File
@@ -1240,7 +1240,7 @@ int main(int argc, char *argv[])
int j = 0;
switch_sleep(1000000);
if (!argv || execv(argv[0], argv) == -1) {
if (!argv || !argv[0] || execv(argv[0], argv) == -1) {
fprintf(stderr, "Restart Failed [%s] resorting to plan b\n", strerror(errno));
for (j = 0; j < argc; j++) {
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%s ", argv[j]);