Browse Source

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

Pavel Punsky 1 year ago
parent
commit
f8e9892d3e
1 changed files with 1 additions and 0 deletions
  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) {