Просмотр исходного кода

Fix potential null passed to function expecting nonnull (#1373)

Pavel Punsky 2 лет назад
Родитель
Сommit
f8e9892d3e
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      src/apps/relay/dbdrivers/dbd_sqlite.c

+ 1 - 0
src/apps/relay/dbdrivers/dbd_sqlite.c

@@ -156,6 +156,7 @@ static void fix_user_directory(char *dir0) {
       struct passwd *pwd = getpwuid(getuid());
       if (!pwd) {
         TURN_LOG_FUNC(TURN_LOG_LEVEL_ERROR, "Cannot figure out the user's HOME directory (1)\n");
+        return;
       } else {
         home = pwd->pw_dir;
         if (!home) {