]> git.sur5r.net Git - u-boot/blobdiff - lib_generic/zlib.c
zlib: add watchdog reset call
[u-boot] / lib_generic / zlib.c
index 3d5b5c0d68af8388a3ac4ddc3d2947568c7add11..1b6db3214e9c98cce1903198fba907808b8e42c1 100644 (file)
@@ -1040,6 +1040,8 @@ z_streamp strm;
     state->hold = 0;
     state->bits = 0;
     state->lencode = state->distcode = state->next = state->codes;
+    if (strm->outcb != Z_NULL)
+       (*strm->outcb)(Z_NULL, 0);
     Tracev((stderr, "inflate: reset\n"));
     return Z_OK;
 }
@@ -1952,7 +1954,11 @@ z_streamp strm;
     if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
         return Z_STREAM_ERROR;
     state = (struct inflate_state FAR *)strm->state;
-    if (state->window != Z_NULL) ZFREE(strm, state->window);
+    if (state->window != Z_NULL) {
+       if (strm->outcb != Z_NULL)
+               (*strm->outcb)(Z_NULL, 0);
+       ZFREE(strm, state->window);
+    }
     ZFREE(strm, strm->state);
     strm->state = Z_NULL;
     Tracev((stderr, "inflate: end\n"));