]> git.decadent.org.uk Git - nfs-utils.git/commit - support/export/client.c
libexport.a: Allow malloc(3) failures in client_lookup() and friends
authorChuck Lever <chuck.lever@oracle.com>
Fri, 23 Apr 2010 16:09:35 +0000 (12:09 -0400)
committerSteve Dickson <steved@redhat.com>
Fri, 23 Apr 2010 16:12:10 +0000 (12:12 -0400)
commit08e1512e4a932f41867f0b515348b9402db50cbd
tree9c92bafa32379803bad170083336bc89f76f0df0
parentaa4b66b12b631885ed85f3ebe97e68b033407178
libexport.a: Allow malloc(3) failures in client_lookup() and friends

Clean up: Use malloc(3) instead of xmalloc() in client_lookup() and
client_dup(), ensuring that a failed memory allocation here doesn't
cause our process to exit suddenly.

Allocation of nfs_client records and the m_hostname string are now
consistently handled with malloc(3), calloc(3), strdup(3), and
free(3).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
support/export/client.c