From 21b9cc33337e904dee4cac87794291ca95a148dd Mon Sep 17 00:00:00 2001 From: Michael R Torres Date: Thu, 20 Feb 2020 20:29:00 -0800 Subject: mz: Zero memory allocated for new automops element Prevent crashes when using mausezahn in interactive mode by using calloc to zero the memory upon allocation. Fixes #195 Signed-off-by: Michael R Torres Signed-off-by: Tobias Klauser --- staging/automops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/automops.c b/staging/automops.c index 05fb7de..b67ec90 100644 --- a/staging/automops.c +++ b/staging/automops.c @@ -26,7 +26,7 @@ struct automops * automops_init(void) { // Create initial automops element: - struct automops *new_automops = (struct automops*) malloc(sizeof(struct automops)); + struct automops *new_automops = (struct automops*) calloc(1, sizeof(struct automops)); new_automops->next = new_automops; new_automops->prev = new_automops; automops_set_defaults (new_automops); -- cgit v1.2.3-54-g00ecf change='this.form.submit();'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-06-21 11:25:51 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-07-07 14:54:50 -0400
commitccd73f24ae301798ffd26949d6fbec289d9fc6a6 (patch)
tree65d7d44878139955f120e21c52aa5cad8de2c378 /drivers
parent5a712a8727200fc617072bed2ccd8ba8e1b50408 (diff)
drm/amdgpu/gmc: make some functions static
These are not used outside of the respective gmc ip modules. Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')