viddec3test: Close the duplicate fd's created from omap_bo_dmabuf
[glsdk/omapdrmtest.git] / util / display-kms.c
index c0730bc55ae04fcdcf13d0c9902247383109be78..3c9ed10e15f75b032a1730416bcb3ea9e10054da 100644 (file)
@@ -195,8 +195,10 @@ free_buffers(struct display *disp, uint32_t n)
        uint32_t i;
        for (i = 0; i < n; i++) {
                 if (disp->buf[i]) {
        uint32_t i;
        for (i = 0; i < n; i++) {
                 if (disp->buf[i]) {
+                       close(disp->buf[i]->fd[0]);
                        omap_bo_del(disp->buf[i]->bo[0]);
                        if(disp->multiplanar){
                        omap_bo_del(disp->buf[i]->bo[0]);
                        if(disp->multiplanar){
+                               close(disp->buf[i]->fd[1]);
                                omap_bo_del(disp->buf[i]->bo[1]);
                        }
                 }
                                omap_bo_del(disp->buf[i]->bo[1]);
                        }
                 }