[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4] smb daemon get additional command line parameters from en
From: |
Samuel Thibault |
Subject: |
Re: [PATCH v4] smb daemon get additional command line parameters from env variable |
Date: |
Sat, 2 Nov 2019 09:33:00 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Jordi Pujol, le sam. 02 nov. 2019 08:41:52 +0100, a ecrit:
> @@ -909,6 +910,12 @@ static int slirp_smb(SlirpState* s, cons
> CONFIG_SMBD_COMMAND, s->smb_dir, smb_conf);
> g_free(smb_conf);
>
> + options = g_getenv("SMBDOPTIONS");
> + if (options) {
> + smb_cmdline = g_strdup_printf("%s %s", smb_cmdline, options);
> + g_free(options);
> + }
Again, what g_getenv mustn't be freed. I believe you even get a warning
about it: g_getenv returns a const gchar *.
The old value of smb_cmdline, however, has to be freed, otherwise that's
a memory leak.
Samuel