by ph33t · 7y ago · 0 comments
dsplit(), an even simpler function also calls dcreate() which allocates memory into the variable called 'new' that never gets freed. This is schoolbook example of a memory leak, showing the guy didn't choose C because he's already proficient in it. Or even worse, if he is proficient and the language still allows such serious mistakes to slip through so easily.
Edit: the code is actually completely full of memory leaks the more i read, stuff like else if(dequals(commands.values[0], dcreate(SEARCH))) where dcreate returns a buffer from malloc which would have to be freed.