Commits

Amaury Forgeot d'Arc  committed 774e617

Fix test... and plug a memory leak it discovered.

  • Participants
  • Parent commits 903c12d
  • Branches py3k

Comments (0)

Files changed (2)

File pypy/module/_ssl/interp_ssl.py

                     space, w_socket, True)
             elif (err == SSL_ERROR_ZERO_RETURN and
                   libssl_SSL_get_shutdown(self.ssl) == SSL_RECEIVED_SHUTDOWN):
+                rffi.keep_buffer_alive_until_here(raw_buf, gc_buf)
                 if space.is_none(w_buf):
                     return space.wrapbytes('')
                 else:

File pypy/module/_ssl/test/test_ssl.py

         b = bytearray(8)
         read = ss.read(10, b)
         assert read == 8
+        discard = ss.read()
         read = ss.read(10, b)
         assert read == 0
         self.s.close()