vendor/libgit2/src/xdiff/xmerge.c in rugged-0.28.4 vs vendor/libgit2/src/xdiff/xmerge.c in rugged-0.28.4.1
- old
+ new
@@ -715,25 +715,13 @@
return -1;
}
status = 0;
if (!xscr1) {
result->ptr = xdl_malloc(mf2->size);
- if (!result->ptr) {
- xdl_free_script(xscr2);
- xdl_free_env(&xe1);
- xdl_free_env(&xe2);
- return -1;
- }
memcpy(result->ptr, mf2->ptr, mf2->size);
result->size = mf2->size;
} else if (!xscr2) {
result->ptr = xdl_malloc(mf1->size);
- if (!result->ptr) {
- xdl_free_script(xscr1);
- xdl_free_env(&xe1);
- xdl_free_env(&xe2);
- return -1;
- }
memcpy(result->ptr, mf1->ptr, mf1->size);
result->size = mf1->size;
} else {
status = xdl_do_merge(&xe1, xscr1,
&xe2, xscr2,