diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 18:45:34 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 18:45:34 +0200 |
commit | 2b3e02411ecc09e7d41741b5587655c9b2f955b7 (patch) | |
tree | d839746371ecb8ed64ac81d2e37c11fcd25a00ac /backend/gt68xx_mid.c | |
parent | 787fb1d54ec9ee5fb941ae897fb201feb9cb2fd1 (diff) | |
parent | ad38bc6ecb80ddeb562841b33258dd53659b1da6 (diff) |
Update upstream source from tag 'upstream/1.0.31'
Update to upstream version '1.0.31'
with Debian dir aa7a39fe56343f5e164eec83783f4c923a394865
Diffstat (limited to 'backend/gt68xx_mid.c')
-rw-r--r-- | backend/gt68xx_mid.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/gt68xx_mid.c b/backend/gt68xx_mid.c index 0d5cbe4..1d6a5c6 100644 --- a/backend/gt68xx_mid.c +++ b/backend/gt68xx_mid.c @@ -1006,6 +1006,7 @@ gt68xx_line_reader_new (GT68xx_Device * dev, DBG (3, "gt68xx_line_reader_new: cannot allocate line buffers: %s\n", sane_strstatus (status)); free (reader); + reader = NULL; return status; } @@ -1105,6 +1106,7 @@ gt68xx_line_reader_new (GT68xx_Device * dev, reader->params.depth); gt68xx_line_reader_free_delays (reader); free (reader); + reader = NULL; return SANE_STATUS_UNSUPPORTED; } @@ -1119,6 +1121,7 @@ gt68xx_line_reader_new (GT68xx_Device * dev, DBG (3, "gt68xx_line_reader_new: cannot allocate pixel buffer\n"); gt68xx_line_reader_free_delays (reader); free (reader); + reader = NULL; return SANE_STATUS_NO_MEM; } @@ -1135,6 +1138,7 @@ gt68xx_line_reader_new (GT68xx_Device * dev, free (reader->pixel_buffer); gt68xx_line_reader_free_delays (reader); free (reader); + reader = NULL; return status; } @@ -1150,6 +1154,13 @@ gt68xx_line_reader_free (GT68xx_Line_Reader * reader) DBG (6, "gt68xx_line_reader_free: enter\n"); + if (reader == NULL) + { + DBG (3, "gt68xx_line_reader_free: already freed\n"); + DBG (6, "gt68xx_line_reader_free: leave\n"); + return SANE_STATUS_INVAL; + } + gt68xx_line_reader_free_delays (reader); if (reader->pixel_buffer) @@ -1167,6 +1178,7 @@ gt68xx_line_reader_free (GT68xx_Line_Reader * reader) } free (reader); + reader = NULL; DBG (6, "gt68xx_line_reader_free: leave\n"); return status; |