This commit corrects the "Null pointer dereferences" issue (CID
1465221).
{
DetectBufferType *map = (DetectBufferType *)data;
+ if (map == NULL) {
+ return;
+ }
+
/* Release transformation option memory, if any */
for (int i = 0; i < map->transforms.cnt; i++) {
if (map->transforms.transforms[i].options == NULL)
}
sigmatch_table[map->transforms.transforms[i].transform].Free(NULL, map->transforms.transforms[i].options);
}
- if (map != NULL) {
- SCFree(map);
- }
+
+ SCFree(map);
}
static int DetectBufferTypeInit(void)