https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720495 /home/nyet/17-initialize-portmap-struct.patch
--- a/pmlist.c
+++ b/pmlist.c
@@ -18,7 +18,7 @@
char externalPort, char internalPort,
char protocol, char internalClient, char desc)
{
- struct portMap temp = (struct portMap) malloc(sizeof(struct portMap));
+ struct portMap temp = (struct portMap) calloc(1,sizeof(struct portMap));
temp->m_PortMappingEnabled = enabled;
@@ -35,6 +35,7 @@
if (strlen(desc) < sizeof(temp->m_PortMappingDescription)) strcpy(temp->m_PortMappingDescription, desc);
else strcpy(temp->m_PortMappingDescription, "");
temp->m_PortMappingLeaseDuration = duration;
+ temp->expirationEventId = -1;
temp->next = NULL; temp->prev = NULL;
@@ -212,7 +213,7 @@
else if (temp == pmlist_Tail) // We are the Tail, but not the Head so we have prev
{
pmlist_Tail = pmlist_Tail->prev;
- free (pmlist_Tail->next);
+ free (temp);
pmlist_Tail->next = NULL;
action_succeeded = 1;
}
Sorry. Forgot to mark it as pre.