mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-12 18:06:59 +08:00
ocpasswd: address memory leaks
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
This commit is contained in:
@@ -430,9 +430,17 @@ int main(int argc, char **argv)
|
||||
|
||||
switch(c) {
|
||||
case 'c':
|
||||
if (fpasswd) {
|
||||
fprintf(stderr, "-c option cannot be specified multiple time\n");
|
||||
exit(1);
|
||||
}
|
||||
fpasswd = strdup(optarg);
|
||||
break;
|
||||
case 'g':
|
||||
if (groupname) {
|
||||
fprintf(stderr, "-g option cannot be specified multiple time\n");
|
||||
exit(1);
|
||||
}
|
||||
groupname = strdup(optarg);
|
||||
break;
|
||||
case 'd':
|
||||
|
||||
Reference in New Issue
Block a user