From baba6a96ab7750d9aafed334bf6b40f5f922305a Mon Sep 17 00:00:00 2001 From: Dmitry Osipenko Date: Wed, 7 Feb 2018 02:45:43 +0300 Subject: Reset all pointers in release_surface_data() for consistency This doesn't fix anything, solely for consistency. --- src/surface.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/surface.c b/src/surface.c index 5adc502..11b83f6 100644 --- a/src/surface.c +++ b/src/surface.c @@ -322,6 +322,8 @@ int release_surface_data(tegra_surface *surf) if (surf->frame != NULL) { drm_tegra_bo_unref(surf->aux_bo); + surf->aux_bo = NULL; + close(surf->frame->y_fd); close(surf->frame->cb_fd); close(surf->frame->cr_fd); @@ -335,6 +337,8 @@ int release_surface_data(tegra_surface *surf) surf->y_data = NULL; surf->cb_data = NULL; surf->cr_data = NULL; + + surf->frame = NULL; } surf->data_allocated = false; -- cgit v1.2.3