aboutsummaryrefslogtreecommitdiff
path: root/desiredata
diff options
context:
space:
mode:
Diffstat (limited to 'desiredata')
-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;
}