]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/hashsplit.py
Fix memory leak in *stat calls in _helpers.c
[bup.git] / lib / bup / hashsplit.py
index 5c481321dca0e9e2e855bba37b8943c0d136fc9d..4c903c1e1340e7bf1e18f1c2b99f96c0149e0dd1 100644 (file)
@@ -39,7 +39,10 @@ class Buf:
         self.start += count
 
     def get(self, count):
-        v = buffer(self.data, self.start, count)
+        if count <= 256:
+            v = self.data[self.start : self.start + count]
+        else:
+            v = buffer(self.data, self.start, count)
         self.start += count
         return v