mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
lib: call to 'calloc' has an allocation size of 0 bytes
w->sects = calloc(sizeof(PyObject *), w->ehdr->e_shnum); Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
This commit is contained in:
parent
3f785c913d
commit
83de17ca9b
|
@ -1306,8 +1306,8 @@ static PyObject *elffile_load(PyTypeObject *type, PyObject *args,
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
w->sects = calloc(w->ehdr->e_shnum, sizeof(PyObject *));
|
||||
if (w->ehdr->e_shnum > 0)
|
||||
w->sects = calloc(w->ehdr->e_shnum, sizeof(PyObject *));
|
||||
w->n_sect = w->ehdr->e_shnum;
|
||||
|
||||
return (PyObject *)w;
|
||||
|
|
Loading…
Reference in a new issue