commit | 83a94da5b10e87dc8edc00ac6a8735f679a45b73 | [log] [tgz] |
---|---|---|
author | akmhoque <akmhoque@gmail.com> | Fri Mar 15 01:38:21 2013 -0500 |
committer | akmhoque <akmhoque@gmail.com> | Fri Mar 15 01:38:21 2013 -0500 |
tree | 1b0cb9d512d90cb1509521c4a9ea18da53ce60ce | |
parent | 284056b9fb0b0830833821188b254d238ebca345 [diff] [blame] |
Free Some Unfreed Memory
diff --git a/nlsr_npt.c b/nlsr_npt.c index 00728cd..3f9f240 100644 --- a/nlsr_npt.c +++ b/nlsr_npt.c
@@ -49,8 +49,7 @@ { ne=e->data; - ne->orig_router=(char *)malloc(strlen(orig_router)+1); - memset(ne->orig_router,0,strlen(orig_router)+1); + ne->orig_router=(char *)calloc(strlen(orig_router)+1,sizeof(char)); memcpy(ne->orig_router,orig_router,strlen(orig_router)+1);