commit - 871cb200f7caefc9aa9b5d748d81302f612147f9
commit + f7520f7a437fe99ad7db71964be0162efa23ff3d
blob - 7eb70e9624de8eb3893a1a5803d608e62d5bf3f1
blob + 6f507148f4fa7c50700629c3309906834c5a51b3
--- gotd/gotd.c
+++ gotd/gotd.c
struct gotd_secrets *secrets = NULL;
int ch, fd = -1, daemonize = 1, verbosity = 0, noaction = 0;
const char *confpath = GOTD_CONF_PATH;
- const char *secretspath = NULL;
+ char *secretspath = NULL;
char *argv0 = argv[0];
char title[2048];
struct passwd *pw = NULL;
fatal("realpath '%s'", optarg);
break;
case 's':
- secretspath = optarg;
+ secretspath = realpath(optarg, NULL);
+ if (secretspath == NULL)
+ fatal("realpath '%s'", optarg);
break;
case 'T':
switch (*optarg) {
event_dispatch();
free(repo_path);
+ free(secretspath);
free(default_sender);
gotd_shutdown();