summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/imports.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/imports.c')
-rw-r--r--src/mesa/main/imports.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 2985ad777cf..934a2d05f75 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -218,8 +218,7 @@ _mesa_realloc(void *oldBuffer, size_t oldSize, size_t newSize)
void *newBuffer = malloc(newSize);
if (newBuffer && oldBuffer && copySize > 0)
memcpy(newBuffer, oldBuffer, copySize);
- if (oldBuffer)
- free(oldBuffer);
+ free(oldBuffer);
return newBuffer;
}