diff options
-rw-r--r-- | lib/wx/c_src/wxe_driver.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/wx/c_src/wxe_driver.c b/lib/wx/c_src/wxe_driver.c index 14a9d1e982..2404b13cc3 100644 --- a/lib/wx/c_src/wxe_driver.c +++ b/lib/wx/c_src/wxe_driver.c @@ -117,8 +117,7 @@ wxe_driver_start(ErlDrvPort port, char *buff) if(WXE_DRV_PORT == 0) { for(; *buff != 32; buff++); buff++; - erl_wx_privdir = malloc(strlen(buff)); - strcpy(erl_wx_privdir, buff); + erl_wx_privdir = strdup(buff); WXE_DRV_PORT = port; wxe_master = data; |