Fix memory leak reported by valgrind while running test_subprocess
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
index d43d4aa..a88f01f 100644
--- a/Modules/_bsddb.c
+++ b/Modules/_bsddb.c
@@ -2721,6 +2721,8 @@
      */
     if (size == 0 && (flags & DB_FAST_STAT)) {
         flags = 0;
+        if (!err)
+            free(sp);
         goto redo_stat_for_length;
     }