Release the authmech before starting to free data in an authhandle.
authorFredrik Tolf <fredrik@dolda2000.com>
Thu, 5 Jun 2008 13:32:29 +0000 (15:32 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Thu, 5 Jun 2008 13:32:29 +0000 (15:32 +0200)
daemon/auth.c

index 470c985..d8c7a35 100644 (file)
@@ -80,10 +80,10 @@ void authputhandle(struct authhandle *auth)
 {
     if(--auth->refcount)
        return;
-    if(auth->text != NULL)
-       free(auth->text);
     if(auth->mechdata != NULL)
        auth->mech->release(auth);
+    if(auth->text != NULL)
+       free(auth->text);
     free(auth);
 }