From 394f99e32c26a69f483cb171569bef1d8284ba21 Mon Sep 17 00:00:00 2001 From: Ken Steele Date: Fri, 17 May 2013 10:05:04 -0400 Subject: [PATCH] Use PacketGetfromAlloc() for packet allocation instead of SCMalloc. Only changed in one file for testing. --- src/app-layer-detect-proto.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app-layer-detect-proto.c b/src/app-layer-detect-proto.c index bd5ebd41ac..03ee632e0f 100644 --- a/src/app-layer-detect-proto.c +++ b/src/app-layer-detect-proto.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2010 Open Information Security Foundation +/* Copyright (C) 2007-2013 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -412,11 +412,9 @@ uint16_t AppLayerDetectGetProtoPMParser(AlpProtoDetectCtx *ctx, &tdir->pmq, buf, searchlen); #else - Packet *p = SCMalloc(SIZE_OF_PACKET); + Packet *p = PacketGetFromAlloc(); if (unlikely(p == NULL)) goto end; - memset(p, 0, SIZE_OF_PACKET); - p->pkt = (uint8_t *)(p + 1); p->cuda_done = 0; p->cuda_free_packet = 1;