Re: PATCH: 7/10: python auth callback API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 04, 2007 at 10:10:28PM +0100, Jim Meyering wrote:
> "Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:
> > This adds a binding for the virConnectOpenAuth() api in the python
> > API. This allows a python function to be used as the callback.
> > diff -r 8a79678f789f python/libvir.c

> > --- a/python/libvir.c	Wed Nov 28 23:01:30 2007 -0500
> > +++ b/python/libvir.c	Wed Nov 28 23:29:40 2007 -0500
> ...
> > +static PyObject *
> > +libvirt_virConnectOpenAuth(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
> ...
> > +    auth.ncredtype = PyList_Size(pycredtype);
> > +    if (auth.ncredtype) {
> > +        int i;
> > +        auth.credtype = malloc(sizeof(int) * auth.ncredtype);
> 
> Check for malloc failure:
> 
>         if (!auth.credtype)
>             return NULL;

THanks for that. Will make the change..

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]