[lxc-devel] strdup return value

Michael Tokarev mjt at tls.msk.ru
Tue Nov 17 23:25:20 UTC 2009


I wodner why all code checks for malloc return value
but almost no places checks for strdup.

Maybe it is better idea to define xmalloc()/xstrdup()
that aborts if memory allocation failed, instead of
scattering error checking all over?

Note that after the container is running, there's almost
no memory allocations anymore, so it wont fail while
everything is running.

/mjt




More information about the lxc-devel mailing list