[Pkg-gnupg-commit] [gpgme] 94/132: qt: Use gpgrt_asprintf instead of qstrdup
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Apr 26 01:01:33 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gpgme.
commit 9d5048d47446450a34cae4f27eb81c02ea5d4afc
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Mon Mar 13 11:14:54 2017 +0100
qt: Use gpgrt_asprintf instead of qstrdup
* lang/qt/src/dn.cpp (parse_dn_part): Use gpgrt_asprintf instead
of qstrdup.
--
This fixes a new / free mismatch because qstrdup uses new and
the allocated parts are freed with free. Similar to: a09ed3f2
---
lang/qt/src/dn.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lang/qt/src/dn.cpp b/lang/qt/src/dn.cpp
index 3376aef..f9fb2f6 100644
--- a/lang/qt/src/dn.cpp
+++ b/lang/qt/src/dn.cpp
@@ -37,7 +37,7 @@
#include "dn.h"
-#include <strings.h>
+#include <gpg-error.h>
static const struct {
const char *name;
@@ -167,7 +167,7 @@ parse_dn_part(DnPair *array, const unsigned char *string)
for (unsigned int i = 0; i < numOidMaps; ++i)
if (!strcasecmp((char *)p, oidmap[i].oid)) {
free(p);
- p = qstrdup(oidmap[i].name);
+ gpgrt_asprintf(&p, oidmap[i].name);
break;
}
array->key = p;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list