The logic of this patch looks ok, but there's no need to use heap memory
for the buffer. This is C++, which allows dynamic array sizing of stack
variables - so for this:
char* newfilename = new char[strlen(filename) + sizeof
(SUFFIX)];
...
delete newfilename;
you can just do:
char newfilename[strlen(filename) + sizeof (SUFFIX)];
and then you don't need to do the delete at the bottom (or worry about
the possibility of code paths that miss it and leak).
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev