Fix double malloc
This commit is contained in:
parent
04a7d2a3ba
commit
bcd53a7cdc
1 changed files with 0 additions and 1 deletions
|
@ -251,7 +251,6 @@ nfc_list_devices(nfc_context *context, nfc_connstring connstrings[], const size_
|
||||||
char *old_env_log_level = NULL;
|
char *old_env_log_level = NULL;
|
||||||
// do it silently
|
// do it silently
|
||||||
if (env_log_level) {
|
if (env_log_level) {
|
||||||
old_env_log_level = malloc(strlen(env_log_level)+1);
|
|
||||||
if ((old_env_log_level = malloc(strlen(env_log_level)+1)) == NULL)
|
if ((old_env_log_level = malloc(strlen(env_log_level)+1)) == NULL)
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
strcpy(old_env_log_level, env_log_level);
|
strcpy(old_env_log_level, env_log_level);
|
||||||
|
|
Loading…
Add table
Reference in a new issue