From: <ges...@us...> - 2009-04-04 15:14:03
|
Revision: 2665 http://ipcop.svn.sourceforge.net/ipcop/?rev=2665&view=rev Author: gespinasse Date: 2009-04-04 15:13:57 +0000 (Sat, 04 Apr 2009) Log Message: ----------- Fix the compilation error and free the pointer after usage Modified Paths: -------------- ipcop/trunk/src/installer/networking.c Modified: ipcop/trunk/src/installer/networking.c =================================================================== --- ipcop/trunk/src/installer/networking.c 2009-04-04 10:07:55 UTC (rev 2664) +++ ipcop/trunk/src/installer/networking.c 2009-04-04 15:13:57 UTC (rev 2665) @@ -390,10 +390,10 @@ /* workaround gcc warning, there is really 1 %s there */ tmpstring = strdup(gettext("TR_INTERFACE")); snprintf(message, STRING_SIZE, tmpstring, "RED"); + free(tmpstring); newtCenteredWindow(72, 14 + numLines, message); networkform = newtForm(NULL, NULL, 0); newtFormAddComponent(networkform, text); - free(tmpstring); /* No point in translating all */ char *radio_text[CFG_RED_COUNT] = @@ -765,7 +765,7 @@ const char *dhcphostnameresult; int error; int numLines; - char tmpstring[STRING_SIZE]; + char *tmpstring; snprintf(message, STRING_SIZE_LARGE, gettext("TR_DHCP_HOSTNAME_LONG")); text = newtTextboxReflowed(1, 1, message, 68, 0, 0, 0); @@ -774,6 +774,7 @@ /* workaround gcc warning, there is really 1 %s there */ tmpstring = strdup(gettext("TR_INTERFACE")); snprintf(message, STRING_SIZE, tmpstring, "RED"); + free(tmpstring); newtCenteredWindow(72, 9 + numLines, message); networkform = newtForm(NULL, NULL, 0); newtFormAddComponent(networkform, text); @@ -857,15 +858,14 @@ snprintf(message, STRING_SIZE, tmpstring, colour); text = newtTextboxReflowed(1, 1, message, 68, 0, 0, 0); numLines = newtTextboxGetNumLines(text); - free(tmpstring); /* workaround gcc warning, there is really 1 %s there */ tmpstring = strdup(gettext("TR_INTERFACE")); snprintf(message, STRING_SIZE, tmpstring, colour); + free(tmpstring); newtCenteredWindow(72, 10 + numLines, message); networkform = newtForm(NULL, NULL, 0); newtFormAddComponent(networkform, text); - free(tmpstring); /* Address */ addresslabel = newtTextbox(2, 2 + numLines, 18, 1, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |