Commit 8aeeeb8ccd0b8504ea7b06a5a72f5f0a5104ae2f
Check values returned by strdup() in filetype.c
Found by clang-check.
Author: xaizek
Author date (UTC): 2012-10-18 15:13
Committer name: xaizek
Committer date (UTC): 2012-10-18 15:13
Parent(s): 1b02fc90e46c3d2f144df1890dc9ac558ac99347
Signing key:
Tree: 930d51149c136838b9c191bc4696ef9b06241515
File src/filetype.c changed (mode: 100644) (index b558c8e4f..c544020d5) |
... |
... |
get_default_program_for_file(const char *file, assoc_record_t *result) |
97 |
97 |
result->description = strdup(prog.description); |
result->description = strdup(prog.description); |
98 |
98 |
free(records.list); |
free(records.list); |
99 |
99 |
|
|
|
100 |
|
if(result->command == NULL || result->description == NULL) |
|
101 |
|
{ |
|
102 |
|
free_assoc_record(result); |
|
103 |
|
return 0; |
|
104 |
|
} |
|
105 |
|
|
100 |
106 |
return 1; |
return 1; |
101 |
107 |
} |
} |
102 |
108 |
|
|