mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 22:28:00 +00:00
um: vector: Fix a memory allocation check
Checking the result of the previous 'kstrdup()' call is expected here, so we should test 'params' and not 'str' (which is known to be non-NULL at this point) Fixes: ad1f62ab2bd4 ("High Performance UML Vector Network Driver") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
9f3199bcef
commit
be967f7da5
1 changed files with 1 additions and 1 deletions
|
@ -723,7 +723,7 @@ static int vector_config(char *str, char **error_out)
|
|||
*/
|
||||
|
||||
params = kstrdup(params, GFP_KERNEL);
|
||||
if (str == NULL) {
|
||||
if (params == NULL) {
|
||||
*error_out = "vector_config failed to strdup string";
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue