mirror of
https://git.savannah.gnu.org/git/screen.git
synced 2026-02-16 04:12:33 +02:00
fix s->st_size being potentially garbage
This commit is contained in:
committed by
Amadeusz Sławiński
parent
6f03f0ea3e
commit
8e1fe11cee
@@ -142,9 +142,9 @@ Log *logfopen(char *name, FILE * fp)
|
||||
return l;
|
||||
}
|
||||
|
||||
if (!(l = malloc(sizeof(Log))))
|
||||
if (!(l = calloc(1, sizeof(Log))))
|
||||
return NULL;
|
||||
if (!(l->st = malloc(sizeof(struct stat)))) {
|
||||
if (!(l->st = calloc(1, sizeof(struct stat)))) {
|
||||
free((char *)l);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user