• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #include "hdf_service_record.h"
10 #include "osal_mem.h"
11 
DevSvcRecordNewInstance(void)12 struct DevSvcRecord *DevSvcRecordNewInstance(void)
13 {
14     return (struct DevSvcRecord *)OsalMemCalloc(sizeof(struct DevSvcRecord));
15 }
16 
DevSvcRecordFreeInstance(struct DevSvcRecord * inst)17 void DevSvcRecordFreeInstance(struct DevSvcRecord *inst)
18 {
19     if (inst != NULL) {
20         OsalMemFree((char *)inst->servName);
21         OsalMemFree((char *)inst->servInfo);
22         OsalMemFree(inst);
23     }
24 }
25 
26