summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-08-19 14:04:32 -0700
committerEmil Velikov <emil.l.velikov@gmail.com>2014-08-27 13:38:29 +0100
commitf293bb9664da86d8e8caf02f5466eec4b18cd8a9 (patch)
treeb70de354e65aebb0ff593a300077e506c4d009b9 /src
parent0931f475fa08fdb5b6ea3521cd3dbebd60952fa9 (diff)
pipe-loader: Fix memory leak v2
v2: - Change driver_name to char* Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> CC: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 43d954342e02a2bd719e543d567fd6c43b3e5367) Conflicts: src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader.h2
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
index caef6c16bec..cfe2c204066 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
@@ -66,7 +66,7 @@ struct pipe_loader_device {
} pci;
} u; /**< Discriminated by \a type */
- const char *driver_name;
+ char *driver_name;
const struct pipe_loader_ops *ops;
};
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
index a3fc186aaa2..228168fe111 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
@@ -256,6 +256,7 @@ pipe_loader_drm_release(struct pipe_loader_device **dev)
util_dl_close(ddev->lib);
close(ddev->fd);
+ FREE(ddev->base.driver_name);
FREE(ddev);
*dev = NULL;
}