prefer "!=" when checking read_in_full() result
[gitweb.git] / send-pack.c
index 11d6f3d98398e8b7a1add501dd7ee85a736531b6..b865f662e41880d11305ac6a4fe64450ef26f133 100644 (file)
@@ -492,8 +492,11 @@ int send_pack(struct send_pack_args *args,
                         * we were to send it and we're trying to send the refs
                         * atomically, abort the whole operation.
                         */
-                       if (use_atomic)
+                       if (use_atomic) {
+                               strbuf_release(&req_buf);
+                               strbuf_release(&cap_buf);
                                return atomic_push_failure(args, remote_refs, ref);
+                       }
                        /* Fallthrough for non atomic case. */
                default:
                        continue;