~ubuntu-branches/ubuntu/natty/virtualbox-ose/natty-updates

« back to all changes in this revision

Viewing changes to src/VBox/Additions/x11/vboxvideo/vboxvideo_13.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-10-15 02:12:28 UTC
  • mfrom: (0.3.10 upstream) (0.4.19 sid)
  • Revision ID: james.westby@ubuntu.com-20101015021228-5e6vbxgtes8mg189
Tags: 3.2.10-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - VirtualBox should go in Accessories, not in System tools.
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Add ubuntu-01-fix-build-gcc45.patch to fix FTBFS due to uninitalized
  variables. Thanks to Lubomir Rintel <lkundrak@v3.sk> for the patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id:  $ */
 
1
/* $Id: vboxvideo_13.c $ */
2
2
/** @file
3
3
 * Linux Additions X11 graphics driver
4
4
 */
169
169
VBOXGetRec(ScrnInfoPtr pScrn)
170
170
{
171
171
    if (!pScrn->driverPrivate) {
172
 
        pScrn->driverPrivate = xcalloc(sizeof(VBOXRec), 1);
 
172
        pScrn->driverPrivate = calloc(sizeof(VBOXRec), 1);
173
173
    }
174
174
 
175
175
    return ((VBOXPtr)pScrn->driverPrivate);
179
179
VBOXFreeRec(ScrnInfoPtr pScrn)
180
180
{
181
181
    VBOXPtr pVBox = VBOXGetRec(pScrn);
182
 
    xfree(pVBox->savedPal);
183
 
    xfree(pVBox->fonts);
184
 
    xfree(pScrn->driverPrivate);
 
182
    free(pVBox->savedPal);
 
183
    free(pVBox->fonts);
 
184
    free(pScrn->driverPrivate);
185
185
    pScrn->driverPrivate = NULL;
186
186
}
187
187
 
625
625
                    }
626
626
                }
627
627
            }
628
 
            xfree(usedChips);
 
628
            free(usedChips);
629
629
        }
630
630
    }
631
631
 
632
 
    xfree(devSections);
 
632
    free(devSections);
633
633
 
634
634
    return (foundScreen);
635
635
}
759
759
 
760
760
    /* options */
761
761
    xf86CollectOptions(pScrn, NULL);
762
 
    if (!(pVBox->Options = xalloc(sizeof(VBOXOptions))))
 
762
    if (!(pVBox->Options = malloc(sizeof(VBOXOptions))))
763
763
        return FALSE;
764
764
    memcpy(pVBox->Options, VBOXOptions, sizeof(VBOXOptions));
765
765
    xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pVBox->Options);
1122
1122
    for (v = mon->vrefresh[0].lo; v <= mon->vrefresh[0].hi; v++) {
1123
1123
        mode = xf86CVTMode(p->HDisplay, p->VDisplay, v, 0, 0);
1124
1124
        ret = xf86CheckModeForMonitor(mode, mon);
1125
 
        xfree(mode);
 
1125
        free(mode);
1126
1126
        if (ret == MODE_OK)
1127
1127
            break;
1128
1128
    }
1350
1350
            {
1351
1351
                /* don't rely on the memory not being touched */
1352
1352
                if (pVBox->pstate == NULL)
1353
 
                    pVBox->pstate = xalloc(pVBox->stateSize);
 
1353
                    pVBox->pstate = malloc(pVBox->stateSize);
1354
1354
                memcpy(pVBox->pstate, pVBox->state,
1355
1355
                       (unsigned) pVBox->stateSize);
1356
1356
            }