Fix wrong malloc()
Error reported by cppcheck Size of pointer 'cell_var' used instead of size of its data. [pointerSize] console_var_t * cell_var = ^
This commit is contained in:
parent
152dd5670e
commit
af7b7d4291
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ void console_register_variable(Console_t * console,
|
|||
if (!console_is_registered_variable(console, varname)){
|
||||
// on crée la structure;
|
||||
console_var_t * cell_var =
|
||||
(console_var_t *) malloc (sizeof(console_var_t *));
|
||||
(console_var_t *) malloc (sizeof(console_var_t));
|
||||
|
||||
// remplir les champs de cell_var;
|
||||
//cell_var->name = strndup(varname, varnamelen);
|
||||
|
|
Loading…
Reference in a new issue