[isf-wifidog] (fw_iptables.c:526) popen(): Cannot allocate memory - where is pclose()?

acv acv at miniguru.ca
Mer 10 Nov 19:14:19 EST 2010


On Fri, Nov 05, 2010 at 02:28:56PM +0900, Kazuki Shimada wrote:
> iptables_insert_gateway_id(&script);
> output = popen(script, "r");
> free(script);
> if (!output) {
> debug(LOG_ERR, "popen(): %s", strerror(errno));
> return -1;
> }
> 
> If "output" is false, iptables_fw_counters_update() function seems to
> end without pclese().
> Is this OK?

	It is OK because if output is false, popen failed so there is nothing to
close. This is strange that it ran out of memory.

Alex

> 
> I'm not a skilled programmer, please correct me if I'm wrong.
> 
> Thanks in advance,
> 
> Kazuki Shimada
> Ninjin-net.com

> _______________________________________________
> WiFiDog mailing list
> WiFiDog at listes.ilesansfil.org
> http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: non disponible
Type: application/pgp-signature
Taille: 195 octets
Desc: non disponible
URL: <http://listes.ilesansfil.org/pipermail/wifidog/attachments/20101110/17d87b58/attachment.pgp>


Plus d'informations sur la liste de diffusion WiFiDog