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:
Timo Sirainen 2002-01-28 15:20:57 +00:00 committed by cras
commit 747d0f19ca
5 changed files with 23 additions and 3 deletions

View file

@ -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);