aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/tests/socket_test.c
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-11-07 13:03:44 +0000
committerJan Hutter <jhutter@hsr.ch>2005-11-07 13:03:44 +0000
commit7bcc8667437044bd50852dd8978682644dbe73fd (patch)
tree5ed191da55e4322d4b07c55ab646c30f68f32c5e /Source/charon/tests/socket_test.c
parentda6f775610a8438d35b723d549dc63178282b2aa (diff)
downloadstrongswan-7bcc8667437044bd50852dd8978682644dbe73fd.tar.bz2
strongswan-7bcc8667437044bd50852dd8978682644dbe73fd.tar.xz
- fixed memory free error
Diffstat (limited to 'Source/charon/tests/socket_test.c')
-rw-r--r--Source/charon/tests/socket_test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/charon/tests/socket_test.c b/Source/charon/tests/socket_test.c
index 98a1eb16d..4e761496b 100644
--- a/Source/charon/tests/socket_test.c
+++ b/Source/charon/tests/socket_test.c
@@ -38,7 +38,9 @@ void test_socket(tester_t *tester)
packet_t *pkt = packet_create(AF_INET);
char *test_string = "Testing functionality of socket_t";
- pkt->data.ptr = test_string;
+
+ pkt->data.ptr = alloc_bytes(strlen(test_string),"test_string");
+ memcpy(pkt->data.ptr,test_string,strlen(test_string));
pkt->data.len = strlen(test_string);
/* send to previously bound socket */