mirror of
https://github.com/irssi/irssi.git
synced 2026-08-18 08:02:13 +02:00
Fixed a few minor memleaks. Don't use g_strdup() in lib-popt because it may
be freed with a real free() call instead of g_free(). git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2352 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
08c23ce6d4
commit
747d0f19ca
5 changed files with 23 additions and 3 deletions
|
|
@ -452,7 +452,8 @@ int poptGetNextOpt(poptContext con) {
|
|||
|
||||
if (opt->arg && (opt->argInfo & POPT_ARG_MASK) != POPT_ARG_NONE
|
||||
&& (opt->argInfo & POPT_ARG_MASK) != POPT_ARG_VAL)
|
||||
con->finalArgv[con->finalArgvCount++] = g_strdup(con->os->nextArg);
|
||||
con->finalArgv[con->finalArgvCount++] =
|
||||
strcpy(malloc(strlen(con->os->nextArg)), con->os->nextArg);
|
||||
}
|
||||
|
||||
if (dup) g_free(dup);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue