diff options
| author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-20 22:47:07 +1000 |
|---|---|---|
| committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-20 22:54:09 +1000 |
| commit | 7072f6112c29c93596fcd3732f8b2d59204b7ae9 (patch) | |
| tree | 815a4c5c3a6923397c637e4eeb2c531be7d47750 | |
| parent | 9a06de63e7dc3e2953239d8e7012b1ec499c4ba1 (diff) | |
Swaylock: Use calloc instead of malloc
| -rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -212,7 +212,7 @@ static cairo_surface_t *select_image(struct swaylock_state *state, static void load_image(char *arg, struct swaylock_state *state) { // [<output>:]<path> - struct swaylock_image *image = malloc(sizeof(struct swaylock_image)); + struct swaylock_image *image = calloc(1, sizeof(struct swaylock_image)); char *separator = strchr(arg, ':'); if (separator) { *separator = '\0'; |
