Diff between dcef4bec25e977c54d783e3821f5d2d6c0dca1ca and 18c8d81de1b1d596b3b6431409b903b7f77f3a8a
Changed Files
| File | Additions | Deletions | Status |
| obexd/gwobex/obex-priv.c | +5 | -3 | modified |
Full Patch
diff --git a/obexd/gwobex/obex-priv.c b/obexd/gwobex/obex-priv.c
index cbae210..86e9dd9 100644
--- a/obexd/gwobex/obex-priv.c
+++ b/obexd/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;