do not dereference NULL pointer modules if we do not have dlopen
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
		 Andrew Bartlett
					Andrew Bartlett
				
			
				
					committed by
					
						 Jeffrey Altman
						Jeffrey Altman
					
				
			
			
				
	
			
			
			 Jeffrey Altman
						Jeffrey Altman
					
				
			
						parent
						
							1c8cae58cc
						
					
				
				
					commit
					d99b8acd1c
				
			| @@ -538,7 +538,7 @@ _krb5_plugin_run_f(krb5_context context, | ||||
| 		   krb5_error_code (KRB5_LIB_CALL *func)(krb5_context, const void *, void *, void *)) | ||||
| { | ||||
|     heim_string_t m = heim_string_create(module); | ||||
|     heim_dict_t dict; | ||||
|     heim_dict_t dict = NULL; | ||||
|     void *plug_ctx; | ||||
|     struct common_plugin_method *cpm; | ||||
|     struct iter_ctx s; | ||||
| @@ -561,7 +561,9 @@ _krb5_plugin_run_f(krb5_context context, | ||||
|     s.ret = KRB5_PLUGIN_NO_HANDLE; | ||||
|  | ||||
|     /* Get loaded plugins */ | ||||
|     dict = heim_dict_copy_value(modules, m); | ||||
|     if (modules) | ||||
| 	dict = heim_dict_copy_value(modules, m); | ||||
|  | ||||
|     heim_release(m); | ||||
|  | ||||
|     /* Add loaded plugins to s.result array */ | ||||
| @@ -603,7 +605,8 @@ _krb5_plugin_run_f(krb5_context context, | ||||
|  | ||||
|     heim_release(s.result); | ||||
|     heim_release(s.n); | ||||
|     heim_release(dict); | ||||
|     if (dict) | ||||
| 	heim_release(dict); | ||||
|  | ||||
|     return s.ret; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user