Home GnuPG
Diffusion GnuPG 850f09b2e30c

tests: avoid use of freed pointer
850f09b2e30cUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

tests: avoid use of freed pointer

[spotted by coverity]

This is only in tests/, but easy to fix, so...
I've included extra context so you can see how var->value would
be used in the following atoi call.

From cf9ae83fd2da8d7a289b048ef0feed4096f6d263 Mon Sep 17 00:00:00 2001

From: Jim Meyering <meyering@redhat.com>
Date: Tue, 20 Sep 2011 16:32:59 +0200
Subject: [PATCH] avoid use of free'd pointer

  • asschk.c (set_type_var): Set var->value to NULL after freeing it,

to avoid subsequent use of freed pointer.

Details

Provenance
meyeringAuthored on Sep 20 2011, 4:35 PM
wernerCommitted on Sep 20 2011, 6:14 PM
Parents
rGb8b4d5c9e55c: avoid use of freed pointer
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG850f09b2e30c: tests: avoid use of freed pointer (authored by Jim Meyering <jim@meyering.net>).Sep 20 2011, 6:14 PM