[pacman-dev] [PATCH] libalpm:Dereference double pointer before assigning NULL.
Daniel T. Borelli
danieltborelli at gmail.com
Fri Nov 15 15:03:42 UTC 2019
Hi.
I believe that the author's intention was to dereference the double
pointer before assigning it NULL so that it has an effect outside the
function.
Signed-off-by: Daniel T. Borelli <danieltborelli at gmail.com>
---
lib/libalpm/signing.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index cab31f8e..3c4f883f 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -479,7 +479,7 @@ static int email_from_uid(const char *uid, char
**email) char *start, *end;
if (uid == NULL) {
- email = NULL;
+ *email = NULL;
return -1;
}
@@ -492,7 +492,7 @@ static int email_from_uid(const char *uid, char
**email) STRNDUP(*email, start+1, end-start-1, return -1);
return 0;
} else {
- email = NULL;
+ *email = NULL;
return -1;
}
}
--
2.24.0
More information about the pacman-dev
mailing list