summaryrefslogtreecommitdiffstats
path: root/x11vnc/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/util.c')
-rw-r--r--x11vnc/util.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/x11vnc/util.c b/x11vnc/util.c
index 8773538..83ec4c9 100644
--- a/x11vnc/util.c
+++ b/x11vnc/util.c
@@ -333,10 +333,7 @@ char **create_str_list(char *cslist) {
}
/* the extra last one holds NULL */
- list = (char **) malloc( (n+1)*sizeof(char *) );
- for(i=0; i < n+1; i++) {
- list[i] = NULL;
- }
+ list = (char **) calloc((n+1)*sizeof(char *), 1);
p = strtok(str, ",");
i = 0;