diff options
author | Werner Koch <[email protected]> | 2017-03-29 09:57:40 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2017-03-29 10:08:31 +0000 |
commit | afa86809087909a8ba2f9356588bf90cc923529c (patch) | |
tree | ff0941a7831c23a47f9dafa522b375b7cc00daa4 /g10/encrypt.c | |
parent | indent: Re-indent function free-packet. (diff) | |
download | gnupg-afa86809087909a8ba2f9356588bf90cc923529c.tar.gz gnupg-afa86809087909a8ba2f9356588bf90cc923529c.zip |
gpg: Extend free_packet to handle a packet parser context.
* g10/packet.h (struct parse_packet_ctx_s): Add fields LAST_PKT and
FREE_LAST_PKT.
(init_parse_packet): Clear them.
(deinit_parse_packet): New macro. Change all users if
init_parse_packet to also call this macro.
* g10/free-packet.c (free_packet): Add arg PARSECTX and handle shallow
packet copies in the context. Change all callers.
* g10/parse-packet.c (parse): Store certain packets in the parse
context.
--
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/encrypt.c')
-rw-r--r-- | g10/encrypt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/encrypt.c b/g10/encrypt.c index 0a892c2e7..a79a47011 100644 --- a/g10/encrypt.c +++ b/g10/encrypt.c @@ -394,7 +394,7 @@ encrypt_simple (const char *filename, int mode, int use_seskey) } if (pt) pt->buf = NULL; - free_packet (&pkt); + free_packet (&pkt, NULL); xfree (cfx.dek); xfree (s2k); release_armor_context (afx); @@ -755,7 +755,7 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename, } if (pt) pt->buf = NULL; - free_packet (&pkt); + free_packet (&pkt, NULL); xfree (cfx.dek); xfree (symkey_dek); xfree (symkey_s2k); |