aboutsummaryrefslogtreecommitdiff
path: root/desiredata/src
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2009-04-26 17:47:54 +0000
committerN.N. <matju@users.sourceforge.net>2009-04-26 17:47:54 +0000
commit35470c130a007fa196b3c19867fd047abcc350f0 (patch)
tree254311b3f4c72953a81c4bb1da1477b57a6334a2 /desiredata/src
parent1af5773faa04e03fffc338b281cb8b9b38045a10 (diff)
use new/delete[] instead of malloc/free
svn path=/trunk/; revision=11155
Diffstat (limited to 'desiredata/src')
-rw-r--r--desiredata/src/s_path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/desiredata/src/s_path.c b/desiredata/src/s_path.c
index 34925739..7bd721b4 100644
--- a/desiredata/src/s_path.c
+++ b/desiredata/src/s_path.c
@@ -252,10 +252,10 @@ extern "C" int sys_argparse(int argc, char **argv);
static int sys_argparse(std::vector<char *> args) {
size_t argc = args.size();
- char **argv = (char **)malloc(argc*sizeof(char *));
+ char **argv = new char *[argc];
for (size_t i=0; i<argc; i++) argv[i] = args[i];
int r = sys_argparse(argc,argv);
- free(argv);
+ delete[] argv;
return r;
}