diff options
author | Christophe Fergeau <cfergeau@mandriva.com> | 2009-04-03 17:46:30 +0000 |
---|---|---|
committer | Christophe Fergeau <cfergeau@mandriva.com> | 2009-04-03 17:46:30 +0000 |
commit | c332dcbce4b0030ece7a8bd88ac1bc15980ec47b (patch) | |
tree | 115cd907181f4ccc157fb1a6230c26e717f5a500 | |
parent | a30eb33ddef01e39c044a33cd45af88292641406 (diff) | |
download | ldetect-c332dcbce4b0030ece7a8bd88ac1bc15980ec47b.tar ldetect-c332dcbce4b0030ece7a8bd88ac1bc15980ec47b.tar.gz ldetect-c332dcbce4b0030ece7a8bd88ac1bc15980ec47b.tar.bz2 ldetect-c332dcbce4b0030ece7a8bd88ac1bc15980ec47b.tar.xz ldetect-c332dcbce4b0030ece7a8bd88ac1bc15980ec47b.zip |
Check arguments for NULL in free functions
-rw-r--r-- | modalias.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -15,6 +15,8 @@ static char *aliasdefault = NULL; static void free_aliases(struct module_alias *aliases) { + if (aliases == NULL) + return; while (aliases->next) { struct module_alias *next; next = aliases->next; @@ -26,6 +28,8 @@ static void free_aliases(struct module_alias *aliases) { } static void free_options(struct module_options *modoptions) { + if (modoptions == NULL) + return; while (modoptions->next) { struct module_options *next; next = modoptions->next; @@ -38,6 +42,8 @@ static void free_options(struct module_options *modoptions) { } static void free_commands(struct module_command *commands) { + if (commands == NULL) + return; while (commands->next) { struct module_command *next; next = commands->next; @@ -50,6 +56,8 @@ static void free_commands(struct module_command *commands) { } static void free_blacklist(struct module_blacklist *blacklist) { + if (blacklist == NULL) + return; while (blacklist->next) { struct module_blacklist *next; next = blacklist->next; |