Prevent edg_wll_FreeAcl() from crashing on NULL
authorZdeněk Šustr <sustr4@cesnet.cz>
Tue, 21 Aug 2012 15:52:20 +0000 (15:52 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Tue, 21 Aug 2012 15:52:20 +0000 (15:52 +0000)
org.glite.lb.server/src/lb_authz.c

index fa520c7..fad7d80 100644 (file)
@@ -687,9 +687,10 @@ edg_wll_InitAcl(edg_wll_Acl *acl)
 void
 edg_wll_FreeAcl(edg_wll_Acl acl)
 {
-   if ( acl->value ) GRSTgaclAclFree(acl->value);
-   if ( acl->string ) free(acl->string);
-   free(acl);
+   if (acl) {
+          if ( acl->value ) GRSTgaclAclFree(acl->value);
+          if ( acl->string ) free(acl->string); 
+          free(acl); }
 }
 
 int