diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-01 11:21:16 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-01 11:21:16 +0100 |
commit | 95f53bef9ff20c553400b8aa13afa27c04d7d588 (patch) | |
tree | 1f9e66541ded5623f9b2c6a615b48462989f6b86 /gwobex/obex-priv.c | |
parent | 5c1d5721c87e6aec69617da3279d65fe0e5acf90 (diff) | |
download | obexd-95f53bef9ff20c553400b8aa13afa27c04d7d588.tar.gz |
Some minor cleanups
Diffstat (limited to 'gwobex/obex-priv.c')
-rw-r--r-- | gwobex/obex-priv.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gwobex/obex-priv.c b/gwobex/obex-priv.c index cbae210..86e9dd9 100644 --- a/gwobex/obex-priv.c +++ b/gwobex/obex-priv.c @@ -349,11 +349,13 @@ static void get_non_body_headers(obex_t *handle, obex_object_t *object, break; case OBEX_HDR_APPARAM: g_free(xfer->apparam_buf); - xfer->apparam_buf = NULL; xfer->apparam_buf = g_try_malloc(hlen); - if (xfer->apparam_buf) + if (xfer->apparam_buf) { memcpy(xfer->apparam_buf, hv.bs, hlen); - xfer->apparam_size = xfer->apparam_buf ? hlen : 0; + xfer->apparam_size = hlen; + } + else + xfer->apparam_size = 0; break; default: break; |