Check-in [d4309dc8ed]

Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1 Hash:d4309dc8edc85bbaa7315e2462ab413c237de879
Date: 2008-11-03 21:27:36
User: stephan
Comment:fixed a string memleak
Tags And Properties
Changes
hide diffs unified diffs patch

Changes to src/unittests.c

Old (c622de93b0688c42) New (58229c9d4cf4153f)
1 #include <stdio.h> 1 #include <stdio.h>
2 #include <stdlib.h> 2 #include <stdlib.h>
3 #include <string.h> 3 #include <string.h>
4 #include <ctype.h> 4 #include <ctype.h>
5 #ifdef NDEBUG 5 #ifdef NDEBUG
176 hidden lines
182 #include "whrc.h" 182 #include "whrc.h"
183 #include "whclob.h" 183 #include "whclob.h"
184 static void free_string(void*p) 184 static void free_string(void*p)
185 { 185 {
186 MARKER;printf("free_string(@%p[%s])\n",p,(char const *)p); 186 MARKER;printf("free_string(@%p[%s])\n",p,(char const *)p);
> 187 free(p);
187 } 188 }
188 189
189 int rc_test() 190 int rc_test()
190 { 191 {
191 whrc_context * cx = whrc_create_context(); 192 whrc_context * cx = whrc_create_context();
50 hidden lines
242 (0==rc) 243 (0==rc)
243 ? "You win :)" 244 ? "You win :)"
244 : "You lose :("); 245 : "You lose :(");
245 return rc; 246 return rc;
246 } 247 }