Free msg.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 25 Oct 2006 03:31:12 +0000 (03:31 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 25 Oct 2006 03:31:12 +0000 (03:31 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@704 959494ce-11ee-0310-bf91-de5d638817bd

daemon/auth-krb5.c

index 6dc0368..ca52e63 100644 (file)
@@ -305,6 +305,7 @@ static int krbauth(struct authhandle *auth, char *passdata)
                if(auth->text != NULL)
                    free(auth->text);
                auth->text = icmbstowcs((char *)error_message(ret), NULL);
+               free(msg);
                return(AUTH_DENIED);
            }
            free(msg);
@@ -369,8 +370,10 @@ static int krbauth(struct authhandle *auth, char *passdata)
            if((ret = krb5_rd_cred(k5context, data->context, &k5d, &fwdcreds, NULL)) != 0)
            {
                flog(LOG_ERR, "krb5_rd_cred returned an error: %s", error_message(ret));
+               free(msg);
                return(AUTH_ERR);
            }
+           free(msg);
            if(*fwdcreds == NULL)
            {
                flog(LOG_ERR, "forwarded credentials array was empty (from %s)", data->username);