... | ... |
@@ -301,11 +301,13 @@ int main(int argc, char **argv) { |
301 | 301 |
#ifdef HAVE_INITGROUPS |
302 | 302 |
if(initgroups(user->pw_name, user->pw_gid)) { |
303 | 303 |
fprintf(stderr, "ERROR: initgroups() failed.\n"); |
304 |
+ optfree(opts); |
|
304 | 305 |
return 1; |
305 | 306 |
} |
306 | 307 |
#elif HAVE_SETGROUPS |
307 | 308 |
if(setgroups(1, &user->pw_gid)) { |
308 | 309 |
fprintf(stderr, "ERROR: setgroups() failed.\n"); |
310 |
+ optfree(opts); |
|
309 | 311 |
return 1; |
310 | 312 |
} |
311 | 313 |
#endif |
... | ... |
@@ -219,12 +219,14 @@ int main(int argc, char **argv) |
219 | 219 |
#ifdef HAVE_INITGROUPS |
220 | 220 |
if(initgroups(user->pw_name, user->pw_gid)) { |
221 | 221 |
fprintf(stderr, "ERROR: initgroups() failed.\n"); |
222 |
+ optfree(opts); |
|
222 | 223 |
return 1; |
223 | 224 |
} |
224 | 225 |
#elif HAVE_SETGROUPS |
225 | 226 |
if(setgroups(1, &user->pw_gid)) { |
226 | 227 |
fprintf(stderr, "ERROR: setgroups() failed.\n"); |
227 |
- return 1; |
|
228 |
+ optfree(opts); |
|
229 |
+ return 1; |
|
228 | 230 |
} |
229 | 231 |
#endif |
230 | 232 |
|
... | ... |
@@ -422,11 +422,13 @@ main (int argc, char **argv) |
422 | 422 |
#ifdef HAVE_INITGROUPS |
423 | 423 |
if (initgroups(dbowner, user->pw_gid)) { |
424 | 424 |
logg ("^initgroups() failed.\n"); |
425 |
+ optfree (opts); |
|
425 | 426 |
return FCE_USERORGROUP; |
426 | 427 |
} |
427 | 428 |
#elif HAVE_SETGROUPS |
428 | 429 |
if (setgroups(1, &user->pw_gid)) { |
429 | 430 |
logg ("^setgroups() failed.\n"); |
431 |
+ optfree (opts); |
|
430 | 432 |
return FCE_USERORGROUP; |
431 | 433 |
} |
432 | 434 |
#endif |