This commit is contained in:
Olof Hagsand 2016-04-10 20:47:29 +02:00
commit e3b51c3d32
6 changed files with 52 additions and 9 deletions

View file

@ -1703,7 +1703,7 @@ clicon_strsplit_malloc(char *string,
nvec++;
/* alloc vector and append copy of string */
if ((vec = (char**)malloc(nvec* sizeof(char*) + strlen(string)+1)) == NULL){
clicon_err(OE_YANG, errno, "calloc");
clicon_err(OE_YANG, errno, "malloc");
goto err;
}
ptr = (char*)vec + nvec* sizeof(char*); /* this is where ptr starts */