diff options
Diffstat (limited to 'src/smi_output.c')
-rw-r--r-- | src/smi_output.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/smi_output.c b/src/smi_output.c index 5ddbcc8..bbc3f5c 100644 --- a/src/smi_output.c +++ b/src/smi_output.c @@ -151,30 +151,29 @@ SMI_OutputGetModes_native(xf86OutputPtr output) #endif } - - static void SMI_OutputDestroy(xf86OutputPtr output) { ENTER(); - /* Nothing */ + xfree(output->funcs); LEAVE(); } void -SMI_OutputFuncsInit_base(xf86OutputFuncsPtr outputFuncs) +SMI_OutputFuncsInit_base(xf86OutputFuncsPtr* outputFuncs) { - memset(outputFuncs,0,sizeof(outputFuncs)); - outputFuncs->create_resources = SMI_OutputCreateResources; - outputFuncs->mode_valid = SMI_OutputModeValid; - outputFuncs->mode_fixup = SMI_OutputModeFixup; - outputFuncs->prepare = SMI_OutputPrepare; - outputFuncs->commit = SMI_OutputCommit; - outputFuncs->mode_set = SMI_OutputModeSet; - outputFuncs->detect = SMI_OutputDetect; - outputFuncs->destroy = SMI_OutputDestroy; + *outputFuncs = xnfcalloc(sizeof(xf86OutputFuncsRec), 1); + + (*outputFuncs)->create_resources = SMI_OutputCreateResources; + (*outputFuncs)->mode_valid = SMI_OutputModeValid; + (*outputFuncs)->mode_fixup = SMI_OutputModeFixup; + (*outputFuncs)->prepare = SMI_OutputPrepare; + (*outputFuncs)->commit = SMI_OutputCommit; + (*outputFuncs)->mode_set = SMI_OutputModeSet; + (*outputFuncs)->detect = SMI_OutputDetect; + (*outputFuncs)->destroy = SMI_OutputDestroy; } Bool |