]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
f
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 13 May 2024 20:34:31 +0000 (22:34 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 16 May 2024 23:36:38 +0000 (01:36 +0200)
client_common.c

index 81673a7dc5c422814b0e65cfcda52037acceb580..a2ec50f12929a5b6329ad813c44ce6aff7cde68b 100644 (file)
@@ -586,12 +586,12 @@ int client_parse_config(int argc, char *argv[], struct client_task **ct_ptr,
                kf = make_message("%s/key.%s", confdir, user);
                if (stat(kf, &statbuf) != 0) { /* assume file does not exist */
                        const char *home = getenv("HOME");
-                       free(kf);
                        if (!home || !*home) {
                                ret = -ERRNO_TO_PARA_ERROR(EINVAL);
                                errctx = make_message("HOME unset or empty");
                                goto out;
                        }
+                       free(kf);
                        kf = make_message("%s/.ssh/id_rsa", home);
                }
        }