Good catch, thanks Peter!
On 12/3/2016 7:46 AM, Peter Bloomfield wrote:
Hi guys,
On 12/02/2016 10:11:18 AM Fri, Jeffrey Stedfast wrote:
Commentary inline...
...
+static int
+is_gpg_modern()
+{
+ const char vheader[] = "gpg (GnuPG) ";
+ FILE *vpipe;
+ char *vstring;
+ size_t vlen;
+ int ret;
+
+ if ((vpipe = popen ("gpg --version", "r")) == NULL)
+ return 0;
+ vlen = 0;
+ vstring = NULL;
+ if (getline (&vstring, &vlen, vpipe) == -1)
+ return 0;
Shouldn't vpipe be closed in this error condition?
Also vstring should be freed in *both* error conditions.
Peter
_______________________________________________
gmime-devel-list mailing list
gmime-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gmime-devel-list
|