]> git.ipfire.org Git - thirdparty/git.git/blobdiff - credential.c
*.[ch] refactoring: make use of the FREE_AND_NULL() macro
[thirdparty/git.git] / credential.c
index 0ab247ff40a03b6da6281814cc7b41edca934bb5..924ab58538accd8815d8a7c39d5c42ba9441f28e 100644 (file)
@@ -313,10 +313,8 @@ void credential_reject(struct credential *c)
        for (i = 0; i < c->helpers.nr; i++)
                credential_do(c, c->helpers.items[i].string, "erase");
 
-       free(c->username);
-       c->username = NULL;
-       free(c->password);
-       c->password = NULL;
+       FREE_AND_NULL(c->username);
+       FREE_AND_NULL(c->password);
        c->approved = 0;
 }