diff options
Diffstat (limited to '')
-rw-r--r-- | g10/encode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/encode.c b/g10/encode.c index 688cbfc08..ff125079e 100644 --- a/g10/encode.c +++ b/g10/encode.c @@ -159,7 +159,7 @@ encode_crypt( const char *filename, STRLIST remusr ) { IOBUF inp = NULL, out = NULL; PACKET pkt; - PKT_plaintext *pt; + PKT_plaintext *pt = NULL; int rc = 0; u32 filesize; cipher_filter_context_t cfx; @@ -244,7 +244,8 @@ encode_crypt( const char *filename, STRLIST remusr ) iobuf_cancel(out); else iobuf_close(out); /* fixme: check returncode */ - pt->buf = NULL; + if( pt ) + pt->buf = NULL; free_packet(&pkt); m_free(cfx.dek); release_pkc_list( pkc_list ); |