summaryrefslogtreecommitdiff
path: root/source3/client/smbumount.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2001-08-08 16:54:16 +0000
committerSimo Sorce <idra@samba.org>2001-08-08 16:54:16 +0000
commit2f844bf447a98b802daa4b8d552ea4530e7f6108 (patch)
tree7beda0672e5fcc15125a7643d4d5fdef6f02b49e /source3/client/smbumount.c
parent0897979a8b0976e03a84ccaf6a70cbaa62bbd195 (diff)
downloadsamba-2f844bf447a98b802daa4b8d552ea4530e7f6108.tar.gz
samba-2f844bf447a98b802daa4b8d552ea4530e7f6108.tar.bz2
samba-2f844bf447a98b802daa4b8d552ea4530e7f6108.zip
Change all realloc() statements to Realloc() (ecxept for tdb.c)
changed some code to exploit the fact that Realloc(NULL, size) == malloc(size) fixed some possible mem leaks, or seg faults. thanks to andreas moroder (mallocs not checked in client/client.c, client/smbumount.c) (This used to be commit 7f33c01688b825ab2fa9bbb2730bff4f2fa352be)
Diffstat (limited to 'source3/client/smbumount.c')
-rw-r--r--source3/client/smbumount.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/client/smbumount.c b/source3/client/smbumount.c
index dacf4ab67d..983ad44fa0 100644
--- a/source3/client/smbumount.c
+++ b/source3/client/smbumount.c
@@ -74,6 +74,11 @@ canonicalize (char *path)
{
char *canonical = malloc (PATH_MAX + 1);
+ if (!canonical) {
+ fprintf(stderr, "Error! Not enough memory!\n");
+ return NULL;
+ }
+
if (strlen(path) > PATH_MAX) {
fprintf(stderr, "Mount point string too long\n");
return NULL;