Fixed minor format errors and resource leaks
Some format strings used integer values for unsigned integers. Memory and file descriptors leaked in some error conditions.
This commit is contained in:
@ -1242,6 +1242,7 @@ createInstance(char **options, FILTER_PARAMETER **params)
|
||||
if ((my_instance = calloc(1, sizeof(FW_INSTANCE))) == NULL ||
|
||||
(my_instance->lock = (SPINLOCK*) malloc(sizeof(SPINLOCK))) == NULL)
|
||||
{
|
||||
free(my_instance);
|
||||
MXS_ERROR("Memory allocation for firewall filter failed.");
|
||||
return NULL;
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ int i,cflags = 0;
|
||||
else
|
||||
{
|
||||
MXS_ERROR("lagfilter: unsupported option '%s'.",
|
||||
options[i])));
|
||||
options[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user